diff --git a/.golangci.yml b/.golangci.yml index 494a907..0126459 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -38,7 +38,7 @@ linters-settings: goimports: # put imports beginning with prefix after 3rd-party packages; # it's a comma-separated list of prefixes - local-prefixes: github.com/upbound/upjet-provider-template + local-prefixes: github.com/crossplane/upjet-provider-template gocyclo: # minimal code complexity to report, 30 by default (but we recommend 10-20) diff --git a/Makefile b/Makefile index 92eddbb..40d31d4 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PROJECT_NAME ?= provider-aws PROJECT_REPO ?= kubedb.dev/$(PROJECT_NAME) -export TERRAFORM_VERSION ?= 1.3.3 +export TERRAFORM_VERSION ?= 1.5.5 export TERRAFORM_PROVIDER_SOURCE ?= hashicorp/aws export TERRAFORM_PROVIDER_REPO ?= https://github.com/hashicorp/terraform-provider-aws @@ -40,7 +40,7 @@ NPROCS ?= 1 # to half the number of CPU cores. GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 ))) -GO_REQUIRED_VERSION ?= 1.20 +GO_REQUIRED_VERSION ?= 1.19 GOLANGCILINT_VERSION ?= 1.50.0 GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION) @@ -51,28 +51,27 @@ GO_SUBDIRS += cmd internal apis # Setup Kubernetes tools KIND_VERSION = v0.15.0 -UP_VERSION = v0.14.0 +UP_VERSION = v0.18.0 UP_CHANNEL = stable -UPTEST_VERSION = v0.2.1 +UPTEST_VERSION = v0.5.0 -include build/makelib/k8s_tools.mk # ==================================================================================== # Setup Images -REGISTRY_ORGS ?= xpkg.upbound.io/upbound +REGISTRY_ORGS ?= xpkg.kubedb.com/upbound IMAGES = $(PROJECT_NAME) -DOCKER_REGISTRY=ghcr.io/kubedb --include build/makelib/image.mk +-include build/makelib/imagelight.mk # ==================================================================================== # Setup XPKG -XPKG_REG_ORGS ?= xpkg.upbound.io/upbound -# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are +XPKG_REG_ORGS ?= xpkg.kubedb.com/upbound +# NOTE(hasheddan): skip promoting on xpkg.kubedb.com as channel tags are # inferred. -XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/upbound +XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.kubedb.com/upbound XPKGS = $(PROJECT_NAME) -# -include build/makelib/xpkg.mk +-include build/makelib/xpkg.mk # ==================================================================================== # Fallthrough @@ -167,9 +166,23 @@ CROSSPLANE_NAMESPACE = upbound-system -include build/makelib/local.xpkg.mk -include build/makelib/controlplane.mk +# This target requires the following environment variables to be set: +# - UPTEST_EXAMPLE_LIST, a comma-separated list of examples to test +# To ensure the proper functioning of the end-to-end test resource pre-deletion hook, it is crucial to arrange your resources appropriately. +# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/awss/01-delete.yaml.tmpl. +# - UPTEST_CLOUD_CREDENTIALS (optional), multiple sets of AWS IAM User credentials specified as key=value pairs. +# The support keys are currently `DEFAULT` and `PEER`. So, an example for the value of this env. variable is: +# DEFAULT='[default] +# aws_access_key_id = REDACTED +# aws_secret_access_key = REDACTED' +# PEER='[default] +# aws_access_key_id = REDACTED +# aws_secret_access_key = REDACTED' +# The associated `ProviderConfig`s will be named as `default` and `peer`. +# - UPTEST_DATASOURCE_PATH (optional), see https://github.com/upbound/uptest#injecting-dynamic-values-and-datasource uptest: $(UPTEST) $(KUBECTL) $(KUTTL) @$(INFO) running automated tests - @KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL) + @KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --data-source="${UPTEST_DATASOURCE_PATH}" --setup-script=cluster/test/setup.sh --default-conditions="Test" || $(FAIL) @$(OK) running automated tests local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME) @@ -180,6 +193,33 @@ local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME) e2e: local-deploy uptest +crddiff: $(UPTEST) + @$(INFO) Checking breaking CRD schema changes + @for crd in $${MODIFIED_CRD_LIST}; do \ + if ! git cat-file -e "$${GITHUB_BASE_REF}:$${crd}" 2>/dev/null; then \ + echo "CRD $${crd} does not exist in the $${GITHUB_BASE_REF} branch. Skipping..." ; \ + continue ; \ + fi ; \ + echo "Checking $${crd} for breaking API changes..." ; \ + changes_detected=$$($(UPTEST) crddiff revision <(git cat-file -p "$${GITHUB_BASE_REF}:$${crd}") "$${crd}" 2>&1) ; \ + if [[ $$? != 0 ]] ; then \ + printf "\033[31m"; echo "Breaking change detected!"; printf "\033[0m" ; \ + echo "$${changes_detected}" ; \ + echo ; \ + fi ; \ + done + @$(OK) Checking breaking CRD schema changes + +schema-version-diff: + @$(INFO) Checking for native state schema version changes + @export PREV_PROVIDER_VERSION=$$(git cat-file -p "${GITHUB_BASE_REF}:Makefile" | sed -nr 's/^export[[:space:]]*TERRAFORM_PROVIDER_VERSION[[:space:]]*:=[[:space:]]*(.+)/\1/p'); \ + echo Detected previous Terraform provider version: $${PREV_PROVIDER_VERSION}; \ + echo Current Terraform provider version: $${TERRAFORM_PROVIDER_VERSION}; \ + mkdir -p $(WORK_DIR); \ + git cat-file -p "$${GITHUB_BASE_REF}:config/schema.json" > "$(WORK_DIR)/schema.json.$${PREV_PROVIDER_VERSION}"; \ + ./scripts/version_diff.py config/generated.lst "$(WORK_DIR)/schema.json.$${PREV_PROVIDER_VERSION}" config/schema.json + @$(OK) Checking for native state schema version changes + .PHONY: cobertura submodules fallthrough run crds.clean # ==================================================================================== diff --git a/README.md b/README.md index b87220c..f2a733c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Provider AWS `provider-aws` is a [Crossplane](https://crossplane.io/) provider that -is built using [Upjet](https://github.com/upbound/upjet) code +is built using [Upjet](https://github.com/crossplane/upjet) code generation tools and exposes XRM-conformant managed resources for the AWS API. ## Getting Started Install the provider by using the following command after changing the image tag -to the [latest release](https://marketplace.upbound.io/providers/kubedb/provider-aws): +to the [latest release](https://marketplace.kubedb.com/providers/kubedb/provider-aws): ``` up ctp provider install kubedb/provider-aws:v0.1.0 ``` diff --git a/apis/docdb/v1alpha1/zz_cluster_types.go b/apis/docdb/v1alpha1/zz_cluster_types.go index d0b7f0f..b5e5b18 100755 --- a/apis/docdb/v1alpha1/zz_cluster_types.go +++ b/apis/docdb/v1alpha1/zz_cluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,76 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterInitParameters struct { + + // Specifies whether any cluster modifications + // are applied immediately, or during the next maintenance window. Default is + // false. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // A list of EC2 Availability Zones that + // instances in the DB cluster can be created in. + AvailabilityZones []*string `json:"availabilityZones,omitempty" tf:"availability_zones,omitempty"` + + // The days to retain backups for. Default 1 + BackupRetentionPeriod *float64 `json:"backupRetentionPeriod,omitempty" tf:"backup_retention_period,omitempty"` + + // A cluster parameter group to associate with the cluster. + DBClusterParameterGroupName *string `json:"dbClusterParameterGroupName,omitempty" tf:"db_cluster_parameter_group_name,omitempty"` + + // A DB subnet group to associate with this DB instance. + DBSubnetGroupName *string `json:"dbSubnetGroupName,omitempty" tf:"db_subnet_group_name,omitempty"` + + // A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. + DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + + // List of log types to export to cloudwatch. If omitted, no logs will be exported. + // The following log types are supported: audit, profiler. + EnabledCloudwatchLogsExports []*string `json:"enabledCloudwatchLogsExports,omitempty" tf:"enabled_cloudwatch_logs_exports,omitempty"` + + // The name of the database engine to be used for this DB cluster. Defaults to docdb. Valid Values: docdb + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // The database engine version. Updating this argument results in an outage. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // The name of your final DB snapshot + // when this DB cluster is deleted. If omitted, no final snapshot will be + // made. + FinalSnapshotIdentifier *string `json:"finalSnapshotIdentifier,omitempty" tf:"final_snapshot_identifier,omitempty"` + + // The global cluster identifier specified on aws_docdb_global_cluster. + GlobalClusterIdentifier *string `json:"globalClusterIdentifier,omitempty" tf:"global_cluster_identifier,omitempty"` + + // Username for the master DB user. + MasterUsername *string `json:"masterUsername,omitempty" tf:"master_username,omitempty"` + + // The port on which the DB accepts connections + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC + // Default: A 30-minute window selected at random from an 8-hour block of time per regionE.g., 04:00-09:00 + PreferredBackupWindow *string `json:"preferredBackupWindow,omitempty" tf:"preferred_backup_window,omitempty"` + + // The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30 + PreferredMaintenanceWindow *string `json:"preferredMaintenanceWindow,omitempty" tf:"preferred_maintenance_window,omitempty"` + + // Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from final_snapshot_identifier. Default is false. + SkipFinalSnapshot *bool `json:"skipFinalSnapshot,omitempty" tf:"skip_final_snapshot,omitempty"` + + // Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Automated snapshots should not be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced. + SnapshotIdentifier *string `json:"snapshotIdentifier,omitempty" tf:"snapshot_identifier,omitempty"` + + // Specifies whether the DB cluster is encrypted. The default is false. + StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` + + // A map of tags to assign to the DB cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterObservation struct { // Specifies whether any cluster modifications @@ -164,9 +238,18 @@ type ClusterParameters struct { GlobalClusterIdentifier *string `json:"globalClusterIdentifier,omitempty" tf:"global_cluster_identifier,omitempty"` // The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // Password for the master DB user. Note that this may // show up in logs, and it will be stored in the state file. Please refer to the DocumentDB Naming Constraints. // +kubebuilder:validation:Optional @@ -214,8 +297,19 @@ type ClusterParameters struct { // +kubebuilder:validation:Optional TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + // References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"` + // List of VPC security groups to associate // with the Cluster + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector // +kubebuilder:validation:Optional VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"` } @@ -224,6 +318,17 @@ type ClusterParameters struct { type ClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInitParameters `json:"initProvider,omitempty"` } // ClusterStatus defines the observed state of Cluster. @@ -244,7 +349,7 @@ type ClusterStatus struct { type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_clusterinstance_types.go b/apis/docdb/v1alpha1/zz_clusterinstance_types.go index cdb8102..5e31fd6 100755 --- a/apis/docdb/v1alpha1/zz_clusterinstance_types.go +++ b/apis/docdb/v1alpha1/zz_clusterinstance_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,49 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterInstanceInitParameters struct { + + // Specifies whether any database modifications + // are applied immediately, or during the next maintenance window. Default isfalse. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // This parameter does not apply to Amazon DocumentDB. Amazon DocumentDB does not perform minor version upgrades regardless of the value set (see docs). Default true. + AutoMinorVersionUpgrade *bool `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // The EC2 Availability Zone that the DB instance is created in. See docs about the details. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // The identifier of the CA certificate for the DB instance. + CACertIdentifier *string `json:"caCertIdentifier,omitempty" tf:"ca_cert_identifier,omitempty"` + + // A value that indicates whether to enable Performance Insights for the DB Instance. Default false. See [docs] (https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-insights.html) about the details. + EnablePerformanceInsights *bool `json:"enablePerformanceInsights,omitempty" tf:"enable_performance_insights,omitempty"` + + // The name of the database engine to be used for the DocumentDB instance. Defaults to docdb. Valid Values: docdb. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // The instance class to use. For details on CPU and memory, see Scaling for DocumentDB Instances. + // DocumentDB currently supports the below instance classes. + // Please see AWS Documentation for complete details. + InstanceClass *string `json:"instanceClass,omitempty" tf:"instance_class,omitempty"` + + // The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. If you do not specify a value for PerformanceInsightsKMSKeyId, then Amazon DocumentDB uses your default KMS key. + PerformanceInsightsKMSKeyID *string `json:"performanceInsightsKmsKeyId,omitempty" tf:"performance_insights_kms_key_id,omitempty"` + + // The window to perform maintenance in. + // Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". + PreferredMaintenanceWindow *string `json:"preferredMaintenanceWindow,omitempty" tf:"preferred_maintenance_window,omitempty"` + + // Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoter to writer. + PromotionTier *float64 `json:"promotionTier,omitempty" tf:"promotion_tier,omitempty"` + + // A map of tags to assign to the instance. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterInstanceObservation struct { // Specifies whether any database modifications @@ -170,6 +217,17 @@ type ClusterInstanceParameters struct { type ClusterInstanceSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterInstanceParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInstanceInitParameters `json:"initProvider,omitempty"` } // ClusterInstanceStatus defines the observed state of ClusterInstance. @@ -190,8 +248,8 @@ type ClusterInstanceStatus struct { type ClusterInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass)",message="instanceClass is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceClass) || (has(self.initProvider) && has(self.initProvider.instanceClass))",message="spec.forProvider.instanceClass is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterInstanceSpec `json:"spec"` Status ClusterInstanceStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_clusterparametergroup_types.go b/apis/docdb/v1alpha1/zz_clusterparametergroup_types.go index c7f099d..e275228 100755 --- a/apis/docdb/v1alpha1/zz_clusterparametergroup_types.go +++ b/apis/docdb/v1alpha1/zz_clusterparametergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterParameterGroupInitParameters struct { + + // The description of the DocumentDB cluster parameter group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The family of the DocumentDB cluster parameter group. + Family *string `json:"family,omitempty" tf:"family,omitempty"` + + // A list of DocumentDB parameters to apply. Setting parameters to system default values may show a difference on imported resources. + Parameter []ParameterInitParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterParameterGroupObservation struct { // The ARN of the DocumentDB cluster parameter group. @@ -65,6 +87,18 @@ type ClusterParameterGroupParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ParameterInitParameters struct { + + // Valid values are immediate and pending-reboot. Defaults to pending-reboot. + ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` + + // The name of the DocumentDB cluster parameter group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The value of the DocumentDB parameter. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type ParameterObservation struct { // Valid values are immediate and pending-reboot. Defaults to pending-reboot. @@ -84,11 +118,11 @@ type ParameterParameters struct { ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` // The name of the DocumentDB cluster parameter group. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The value of the DocumentDB parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -96,6 +130,17 @@ type ParameterParameters struct { type ClusterParameterGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameterGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterParameterGroupInitParameters `json:"initProvider,omitempty"` } // ClusterParameterGroupStatus defines the observed state of ClusterParameterGroup. @@ -116,8 +161,8 @@ type ClusterParameterGroupStatus struct { type ClusterParameterGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family)",message="family is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterParameterGroupSpec `json:"spec"` Status ClusterParameterGroupStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_clustersnapshot_types.go b/apis/docdb/v1alpha1/zz_clustersnapshot_types.go index a2b26d9..1172011 100755 --- a/apis/docdb/v1alpha1/zz_clustersnapshot_types.go +++ b/apis/docdb/v1alpha1/zz_clustersnapshot_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,9 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterSnapshotInitParameters struct { +} + type ClusterSnapshotObservation struct { // List of EC2 Availability Zones that instances in the DocumentDB cluster snapshot can be restored in. @@ -56,9 +63,19 @@ type ClusterSnapshotObservation struct { type ClusterSnapshotParameters struct { // The DocumentDB Cluster Identifier from which to take the snapshot. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/docdb/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional DBClusterIdentifier *string `json:"dbClusterIdentifier,omitempty" tf:"db_cluster_identifier,omitempty"` + // Reference to a Cluster in docdb to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierRef *v1.Reference `json:"dbClusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in docdb to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierSelector *v1.Selector `json:"dbClusterIdentifierSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -69,6 +86,17 @@ type ClusterSnapshotParameters struct { type ClusterSnapshotSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterSnapshotParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterSnapshotInitParameters `json:"initProvider,omitempty"` } // ClusterSnapshotStatus defines the observed state of ClusterSnapshot. @@ -89,8 +117,7 @@ type ClusterSnapshotStatus struct { type ClusterSnapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier)",message="dbClusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSnapshotSpec `json:"spec"` Status ClusterSnapshotStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_eventsubscription_types.go b/apis/docdb/v1alpha1/zz_eventsubscription_types.go index 5254187..aa39f45 100755 --- a/apis/docdb/v1alpha1/zz_eventsubscription_types.go +++ b/apis/docdb/v1alpha1/zz_eventsubscription_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,27 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type EventSubscriptionInitParameters struct { + + // A boolean flag to enable/disable the subscription. Defaults to true. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html or run aws docdb describe-event-categories. + EventCategories []*string `json:"eventCategories,omitempty" tf:"event_categories,omitempty"` + + // A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. + SourceIds []*string `json:"sourceIds,omitempty" tf:"source_ids,omitempty"` + + // The type of source that will be generating the events. Valid options are db-instance, db-cluster, db-parameter-group, db-security-group, db-cluster-snapshot. If not set, all sources will be subscribed to. + SourceType *string `json:"sourceType,omitempty" tf:"source_type,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type EventSubscriptionObservation struct { // The Amazon Resource Name of the DocumentDB event notification subscription @@ -62,9 +87,19 @@ type EventSubscriptionParameters struct { Region *string `json:"region,omitempty" tf:"-"` // The Amazon Resource Name of the DocumentDB event notification subscription + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/sns/v1alpha1.Topic + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SnsTopicArn *string `json:"snsTopicArn,omitempty" tf:"sns_topic_arn,omitempty"` + // Reference to a Topic in sns to populate snsTopicArn. + // +kubebuilder:validation:Optional + SnsTopicArnRef *v1.Reference `json:"snsTopicArnRef,omitempty" tf:"-"` + + // Selector for a Topic in sns to populate snsTopicArn. + // +kubebuilder:validation:Optional + SnsTopicArnSelector *v1.Selector `json:"snsTopicArnSelector,omitempty" tf:"-"` + // A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. // +kubebuilder:validation:Optional SourceIds []*string `json:"sourceIds,omitempty" tf:"source_ids,omitempty"` @@ -86,6 +121,17 @@ type EventSubscriptionParameters struct { type EventSubscriptionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider EventSubscriptionParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 EventSubscriptionInitParameters `json:"initProvider,omitempty"` } // EventSubscriptionStatus defines the observed state of EventSubscription. @@ -106,8 +152,7 @@ type EventSubscriptionStatus struct { type EventSubscription struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.snsTopicArn)",message="snsTopicArn is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec EventSubscriptionSpec `json:"spec"` Status EventSubscriptionStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_generated.deepcopy.go b/apis/docdb/v1alpha1/zz_generated.deepcopy.go index 4939489..ae8a5c8 100644 --- a/apis/docdb/v1alpha1/zz_generated.deepcopy.go +++ b/apis/docdb/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -41,6 +40,155 @@ func (in *Cluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitParameters) DeepCopyInto(out *ClusterInitParameters) { + *out = *in + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } + if in.AvailabilityZones != nil { + in, out := &in.AvailabilityZones, &out.AvailabilityZones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.BackupRetentionPeriod != nil { + in, out := &in.BackupRetentionPeriod, &out.BackupRetentionPeriod + *out = new(float64) + **out = **in + } + if in.DBClusterParameterGroupName != nil { + in, out := &in.DBClusterParameterGroupName, &out.DBClusterParameterGroupName + *out = new(string) + **out = **in + } + if in.DBSubnetGroupName != nil { + in, out := &in.DBSubnetGroupName, &out.DBSubnetGroupName + *out = new(string) + **out = **in + } + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) + **out = **in + } + if in.EnabledCloudwatchLogsExports != nil { + in, out := &in.EnabledCloudwatchLogsExports, &out.EnabledCloudwatchLogsExports + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.GlobalClusterIdentifier != nil { + in, out := &in.GlobalClusterIdentifier, &out.GlobalClusterIdentifier + *out = new(string) + **out = **in + } + if in.MasterUsername != nil { + in, out := &in.MasterUsername, &out.MasterUsername + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PreferredBackupWindow != nil { + in, out := &in.PreferredBackupWindow, &out.PreferredBackupWindow + *out = new(string) + **out = **in + } + if in.PreferredMaintenanceWindow != nil { + in, out := &in.PreferredMaintenanceWindow, &out.PreferredMaintenanceWindow + *out = new(string) + **out = **in + } + if in.SkipFinalSnapshot != nil { + in, out := &in.SkipFinalSnapshot, &out.SkipFinalSnapshot + *out = new(bool) + **out = **in + } + if in.SnapshotIdentifier != nil { + in, out := &in.SnapshotIdentifier, &out.SnapshotIdentifier + *out = new(string) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitParameters. +func (in *ClusterInitParameters) DeepCopy() *ClusterInitParameters { + if in == nil { + return nil + } + out := new(ClusterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterInstance) DeepCopyInto(out *ClusterInstance) { *out = *in @@ -68,6 +216,103 @@ func (in *ClusterInstance) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInstanceInitParameters) DeepCopyInto(out *ClusterInstanceInitParameters) { + *out = *in + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(bool) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.CACertIdentifier != nil { + in, out := &in.CACertIdentifier, &out.CACertIdentifier + *out = new(string) + **out = **in + } + if in.EnablePerformanceInsights != nil { + in, out := &in.EnablePerformanceInsights, &out.EnablePerformanceInsights + *out = new(bool) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.InstanceClass != nil { + in, out := &in.InstanceClass, &out.InstanceClass + *out = new(string) + **out = **in + } + if in.PerformanceInsightsKMSKeyID != nil { + in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID + *out = new(string) + **out = **in + } + if in.PreferredMaintenanceWindow != nil { + in, out := &in.PreferredMaintenanceWindow, &out.PreferredMaintenanceWindow + *out = new(string) + **out = **in + } + if in.PromotionTier != nil { + in, out := &in.PromotionTier, &out.PromotionTier + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceInitParameters. +func (in *ClusterInstanceInitParameters) DeepCopy() *ClusterInstanceInitParameters { + if in == nil { + return nil + } + out := new(ClusterInstanceInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterInstanceList) DeepCopyInto(out *ClusterInstanceList) { *out = *in @@ -221,7 +466,8 @@ func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -236,7 +482,8 @@ func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -341,7 +588,8 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -356,7 +604,8 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -380,6 +629,7 @@ func (in *ClusterInstanceSpec) DeepCopyInto(out *ClusterInstanceSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceSpec. @@ -600,7 +850,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -615,7 +866,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -654,24 +906,88 @@ func (in *ClusterParameterGroup) DeepCopyInto(out *ClusterParameterGroup) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroup. -func (in *ClusterParameterGroup) DeepCopy() *ClusterParameterGroup { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroup. +func (in *ClusterParameterGroup) DeepCopy() *ClusterParameterGroup { + if in == nil { + return nil + } + out := new(ClusterParameterGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterParameterGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterParameterGroupInitParameters) DeepCopyInto(out *ClusterParameterGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Family != nil { + in, out := &in.Family, &out.Family + *out = new(string) + **out = **in + } + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ParameterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupInitParameters. +func (in *ClusterParameterGroupInitParameters) DeepCopy() *ClusterParameterGroupInitParameters { if in == nil { return nil } - out := new(ClusterParameterGroup) + out := new(ClusterParameterGroupInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterParameterGroup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterParameterGroupList) DeepCopyInto(out *ClusterParameterGroupList) { *out = *in @@ -742,7 +1058,8 @@ func (in *ClusterParameterGroupObservation) DeepCopyInto(out *ClusterParameterGr if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -757,7 +1074,8 @@ func (in *ClusterParameterGroupObservation) DeepCopyInto(out *ClusterParameterGr if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -809,7 +1127,8 @@ func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGro if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -824,7 +1143,8 @@ func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGro if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -848,6 +1168,7 @@ func (in *ClusterParameterGroupSpec) DeepCopyInto(out *ClusterParameterGroupSpec *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupSpec. @@ -952,6 +1273,16 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.MasterPasswordSecretRef != nil { in, out := &in.MasterPasswordSecretRef, &out.MasterPasswordSecretRef *out = new(v1.SecretKeySelector) @@ -1005,7 +1336,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1020,13 +1352,26 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } + if in.VPCSecurityGroupIDRefs != nil { + in, out := &in.VPCSecurityGroupIDRefs, &out.VPCSecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPCSecurityGroupIDSelector != nil { + in, out := &in.VPCSecurityGroupIDSelector, &out.VPCSecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.VPCSecurityGroupIds != nil { in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds *out = make([]*string, len(*in)) @@ -1077,6 +1422,21 @@ func (in *ClusterSnapshot) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotInitParameters) DeepCopyInto(out *ClusterSnapshotInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotInitParameters. +func (in *ClusterSnapshotInitParameters) DeepCopy() *ClusterSnapshotInitParameters { + if in == nil { + return nil + } + out := new(ClusterSnapshotInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterSnapshotList) DeepCopyInto(out *ClusterSnapshotList) { *out = *in @@ -1203,6 +1563,16 @@ func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters *out = new(string) **out = **in } + if in.DBClusterIdentifierRef != nil { + in, out := &in.DBClusterIdentifierRef, &out.DBClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBClusterIdentifierSelector != nil { + in, out := &in.DBClusterIdentifierSelector, &out.DBClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -1225,6 +1595,7 @@ func (in *ClusterSnapshotSpec) DeepCopyInto(out *ClusterSnapshotSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + out.InitProvider = in.InitProvider } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotSpec. @@ -1259,6 +1630,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -1315,6 +1687,85 @@ func (in *EventSubscription) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventSubscriptionInitParameters) DeepCopyInto(out *EventSubscriptionInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.EventCategories != nil { + in, out := &in.EventCategories, &out.EventCategories + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SourceIds != nil { + in, out := &in.SourceIds, &out.SourceIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SourceType != nil { + in, out := &in.SourceType, &out.SourceType + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionInitParameters. +func (in *EventSubscriptionInitParameters) DeepCopy() *EventSubscriptionInitParameters { + if in == nil { + return nil + } + out := new(EventSubscriptionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EventSubscriptionList) DeepCopyInto(out *EventSubscriptionList) { *out = *in @@ -1410,7 +1861,8 @@ func (in *EventSubscriptionObservation) DeepCopyInto(out *EventSubscriptionObser if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1425,7 +1877,8 @@ func (in *EventSubscriptionObservation) DeepCopyInto(out *EventSubscriptionObser if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1473,6 +1926,16 @@ func (in *EventSubscriptionParameters) DeepCopyInto(out *EventSubscriptionParame *out = new(string) **out = **in } + if in.SnsTopicArnRef != nil { + in, out := &in.SnsTopicArnRef, &out.SnsTopicArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SnsTopicArnSelector != nil { + in, out := &in.SnsTopicArnSelector, &out.SnsTopicArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SourceIds != nil { in, out := &in.SourceIds, &out.SourceIds *out = make([]*string, len(*in)) @@ -1497,7 +1960,8 @@ func (in *EventSubscriptionParameters) DeepCopyInto(out *EventSubscriptionParame if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1512,7 +1976,8 @@ func (in *EventSubscriptionParameters) DeepCopyInto(out *EventSubscriptionParame if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1536,6 +2001,7 @@ func (in *EventSubscriptionSpec) DeepCopyInto(out *EventSubscriptionSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionSpec. @@ -1592,6 +2058,51 @@ func (in *GlobalCluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterInitParameters) DeepCopyInto(out *GlobalClusterInitParameters) { + *out = *in + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName + *out = new(string) + **out = **in + } + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.GlobalClusterIdentifier != nil { + in, out := &in.GlobalClusterIdentifier, &out.GlobalClusterIdentifier + *out = new(string) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterInitParameters. +func (in *GlobalClusterInitParameters) DeepCopy() *GlobalClusterInitParameters { + if in == nil { + return nil + } + out := new(GlobalClusterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalClusterList) DeepCopyInto(out *GlobalClusterList) { *out = *in @@ -1624,6 +2135,21 @@ func (in *GlobalClusterList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterMembersInitParameters) DeepCopyInto(out *GlobalClusterMembersInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersInitParameters. +func (in *GlobalClusterMembersInitParameters) DeepCopy() *GlobalClusterMembersInitParameters { + if in == nil { + return nil + } + out := new(GlobalClusterMembersInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalClusterMembersObservation) DeepCopyInto(out *GlobalClusterMembersObservation) { *out = *in @@ -1779,6 +2305,16 @@ func (in *GlobalClusterParameters) DeepCopyInto(out *GlobalClusterParameters) { *out = new(string) **out = **in } + if in.SourceDBClusterIdentifierRef != nil { + in, out := &in.SourceDBClusterIdentifierRef, &out.SourceDBClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SourceDBClusterIdentifierSelector != nil { + in, out := &in.SourceDBClusterIdentifierSelector, &out.SourceDBClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.StorageEncrypted != nil { in, out := &in.StorageEncrypted, &out.StorageEncrypted *out = new(bool) @@ -1801,6 +2337,7 @@ func (in *GlobalClusterSpec) DeepCopyInto(out *GlobalClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterSpec. @@ -1830,6 +2367,36 @@ func (in *GlobalClusterStatus) DeepCopy() *GlobalClusterStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterInitParameters) DeepCopyInto(out *ParameterInitParameters) { + *out = *in + if in.ApplyMethod != nil { + in, out := &in.ApplyMethod, &out.ApplyMethod + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterInitParameters. +func (in *ParameterInitParameters) DeepCopy() *ParameterInitParameters { + if in == nil { + return nil + } + out := new(ParameterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterObservation) DeepCopyInto(out *ParameterObservation) { *out = *in @@ -1917,6 +2484,58 @@ func (in *SubnetGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetGroupInitParameters) DeepCopyInto(out *SubnetGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupInitParameters. +func (in *SubnetGroupInitParameters) DeepCopy() *SubnetGroupInitParameters { + if in == nil { + return nil + } + out := new(SubnetGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SubnetGroupList) DeepCopyInto(out *SubnetGroupList) { *out = *in @@ -1986,7 +2605,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2001,7 +2621,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2064,7 +2685,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2079,7 +2701,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2103,6 +2726,7 @@ func (in *SubnetGroupSpec) DeepCopyInto(out *SubnetGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupSpec. diff --git a/apis/docdb/v1alpha1/zz_generated.managed.go b/apis/docdb/v1alpha1/zz_generated.managed.go index e67b718..4d85967 100644 --- a/apis/docdb/v1alpha1/zz_generated.managed.go +++ b/apis/docdb/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Cluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Cluster. -func (mg *Cluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Cluster. +func (mg *Cluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Cluster. @@ -27,14 +27,6 @@ func (mg *Cluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Cluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Cluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Cluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Cluster. -func (mg *Cluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Cluster. +func (mg *Cluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Cluster. @@ -65,14 +57,6 @@ func (mg *Cluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Cluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Cluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *ClusterInstance) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterInstance. -func (mg *ClusterInstance) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterInstance. +func (mg *ClusterInstance) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterInstance. @@ -103,14 +87,6 @@ func (mg *ClusterInstance) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterInstance. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterInstance) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterInstance. func (mg *ClusterInstance) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *ClusterInstance) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterInstance. -func (mg *ClusterInstance) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterInstance. +func (mg *ClusterInstance) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterInstance. @@ -141,14 +117,6 @@ func (mg *ClusterInstance) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterInstance. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterInstance) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterInstance. func (mg *ClusterInstance) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *ClusterParameterGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterParameterGroup. -func (mg *ClusterParameterGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterParameterGroup. +func (mg *ClusterParameterGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterParameterGroup. @@ -179,14 +147,6 @@ func (mg *ClusterParameterGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterParameterGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterParameterGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterParameterGroup. func (mg *ClusterParameterGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *ClusterParameterGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterParameterGroup. -func (mg *ClusterParameterGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterParameterGroup. +func (mg *ClusterParameterGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterParameterGroup. @@ -217,14 +177,6 @@ func (mg *ClusterParameterGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterParameterGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterParameterGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterParameterGroup. func (mg *ClusterParameterGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -245,9 +197,9 @@ func (mg *ClusterSnapshot) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterSnapshot. -func (mg *ClusterSnapshot) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterSnapshot. +func (mg *ClusterSnapshot) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterSnapshot. @@ -255,14 +207,6 @@ func (mg *ClusterSnapshot) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterSnapshot. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterSnapshot) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterSnapshot. func (mg *ClusterSnapshot) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -283,9 +227,9 @@ func (mg *ClusterSnapshot) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterSnapshot. -func (mg *ClusterSnapshot) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterSnapshot. +func (mg *ClusterSnapshot) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterSnapshot. @@ -293,14 +237,6 @@ func (mg *ClusterSnapshot) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterSnapshot. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterSnapshot) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterSnapshot. func (mg *ClusterSnapshot) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -321,9 +257,9 @@ func (mg *EventSubscription) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this EventSubscription. -func (mg *EventSubscription) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this EventSubscription. +func (mg *EventSubscription) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this EventSubscription. @@ -331,14 +267,6 @@ func (mg *EventSubscription) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this EventSubscription. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *EventSubscription) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this EventSubscription. func (mg *EventSubscription) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -359,9 +287,9 @@ func (mg *EventSubscription) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this EventSubscription. -func (mg *EventSubscription) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this EventSubscription. +func (mg *EventSubscription) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this EventSubscription. @@ -369,14 +297,6 @@ func (mg *EventSubscription) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this EventSubscription. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *EventSubscription) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this EventSubscription. func (mg *EventSubscription) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -397,9 +317,9 @@ func (mg *GlobalCluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this GlobalCluster. -func (mg *GlobalCluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this GlobalCluster. +func (mg *GlobalCluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this GlobalCluster. @@ -407,14 +327,6 @@ func (mg *GlobalCluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this GlobalCluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *GlobalCluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this GlobalCluster. func (mg *GlobalCluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -435,9 +347,9 @@ func (mg *GlobalCluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this GlobalCluster. -func (mg *GlobalCluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this GlobalCluster. +func (mg *GlobalCluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this GlobalCluster. @@ -445,14 +357,6 @@ func (mg *GlobalCluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this GlobalCluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *GlobalCluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this GlobalCluster. func (mg *GlobalCluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -473,9 +377,9 @@ func (mg *SubnetGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this SubnetGroup. @@ -483,14 +387,6 @@ func (mg *SubnetGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this SubnetGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *SubnetGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -511,9 +407,9 @@ func (mg *SubnetGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this SubnetGroup. @@ -521,14 +417,6 @@ func (mg *SubnetGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this SubnetGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *SubnetGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/docdb/v1alpha1/zz_generated.resolvers.go b/apis/docdb/v1alpha1/zz_generated.resolvers.go index a2dd189..e6d597b 100644 --- a/apis/docdb/v1alpha1/zz_generated.resolvers.go +++ b/apis/docdb/v1alpha1/zz_generated.resolvers.go @@ -8,11 +8,57 @@ package v1alpha1 import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - v1beta1 "github.com/upbound/provider-aws/apis/ec2/v1beta1" + v1alpha11 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + v1alpha12 "kubedb.dev/provider-aws/apis/sns/v1alpha1" client "sigs.k8s.io/controller-runtime/pkg/client" ) +// ResolveReferences of this Cluster. +func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCSecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCSecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCSecurityGroupIds") + } + mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences + + return nil +} + // ResolveReferences of this ClusterInstance. func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) @@ -39,6 +85,84 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade return nil } +// ResolveReferences of this ClusterSnapshot. +func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBClusterIdentifier), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.DBClusterIdentifierRef, + Selector: mg.Spec.ForProvider.DBClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBClusterIdentifier") + } + mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this EventSubscription. +func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SnsTopicArn), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.SnsTopicArnRef, + Selector: mg.Spec.ForProvider.SnsTopicArnSelector, + To: reference.To{ + List: &v1alpha12.TopicList{}, + Managed: &v1alpha12.Topic{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SnsTopicArn") + } + mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this GlobalCluster. +func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceDBClusterIdentifier), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.SourceDBClusterIdentifierRef, + Selector: mg.Spec.ForProvider.SourceDBClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SourceDBClusterIdentifier") + } + mg.Spec.ForProvider.SourceDBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SourceDBClusterIdentifierRef = rsp.ResolvedReference + + return nil +} + // ResolveReferences of this SubnetGroup. func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) @@ -52,8 +176,8 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e References: mg.Spec.ForProvider.SubnetIdsRefs, Selector: mg.Spec.ForProvider.SubnetIdsSelector, To: reference.To{ - List: &v1beta1.SubnetList{}, - Managed: &v1beta1.Subnet{}, + List: &v1alpha11.SubnetList{}, + Managed: &v1alpha11.Subnet{}, }, }) if err != nil { diff --git a/apis/docdb/v1alpha1/zz_generated_terraformed.go b/apis/docdb/v1alpha1/zz_generated_terraformed.go index d6318da..5194fe3 100755 --- a/apis/docdb/v1alpha1/zz_generated_terraformed.go +++ b/apis/docdb/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Cluster @@ -69,6 +74,46 @@ func (tr *Cluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Cluster +func (tr *Cluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Cluster +func (tr *Cluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Cluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Cluster) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *ClusterInstance) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterInstance +func (tr *ClusterInstance) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterInstance +func (tr *ClusterInstance) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterInstance using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterInstance) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *ClusterParameterGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterParameterGroup +func (tr *ClusterParameterGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterParameterGroup +func (tr *ClusterParameterGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterParameterGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterParameterGroup) LateInitialize(attrs []byte) (bool, error) { @@ -291,6 +416,46 @@ func (tr *ClusterSnapshot) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterSnapshot +func (tr *ClusterSnapshot) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterSnapshot +func (tr *ClusterSnapshot) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterSnapshot using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterSnapshot) LateInitialize(attrs []byte) (bool, error) { @@ -365,6 +530,46 @@ func (tr *EventSubscription) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this EventSubscription +func (tr *EventSubscription) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this EventSubscription +func (tr *EventSubscription) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this EventSubscription using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *EventSubscription) LateInitialize(attrs []byte) (bool, error) { @@ -439,6 +644,46 @@ func (tr *GlobalCluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this GlobalCluster +func (tr *GlobalCluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalCluster +func (tr *GlobalCluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this GlobalCluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *GlobalCluster) LateInitialize(attrs []byte) (bool, error) { @@ -513,6 +758,46 @@ func (tr *SubnetGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetGroup) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/docdb/v1alpha1/zz_globalcluster_types.go b/apis/docdb/v1alpha1/zz_globalcluster_types.go index 9da6ad6..b80ee1f 100755 --- a/apis/docdb/v1alpha1/zz_globalcluster_types.go +++ b/apis/docdb/v1alpha1/zz_globalcluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,30 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type GlobalClusterInitParameters struct { + + // Name for an automatically created database on cluster creation. + DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` + + // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. + DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + + // Name of the database engine to be used for this DB cluster. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // The global cluster identifier. + GlobalClusterIdentifier *string `json:"globalClusterIdentifier,omitempty" tf:"global_cluster_identifier,omitempty"` + + // Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. + StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` +} + +type GlobalClusterMembersInitParameters struct { +} + type GlobalClusterMembersObservation struct { // Amazon Resource Name (ARN) of member DB Cluster. @@ -91,9 +119,19 @@ type GlobalClusterParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/docdb/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SourceDBClusterIdentifier *string `json:"sourceDbClusterIdentifier,omitempty" tf:"source_db_cluster_identifier,omitempty"` + // Reference to a Cluster in docdb to populate sourceDbClusterIdentifier. + // +kubebuilder:validation:Optional + SourceDBClusterIdentifierRef *v1.Reference `json:"sourceDbClusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in docdb to populate sourceDbClusterIdentifier. + // +kubebuilder:validation:Optional + SourceDBClusterIdentifierSelector *v1.Selector `json:"sourceDbClusterIdentifierSelector,omitempty" tf:"-"` + // Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. // +kubebuilder:validation:Optional StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` @@ -103,6 +141,17 @@ type GlobalClusterParameters struct { type GlobalClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider GlobalClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 GlobalClusterInitParameters `json:"initProvider,omitempty"` } // GlobalClusterStatus defines the observed state of GlobalCluster. @@ -123,8 +172,8 @@ type GlobalClusterStatus struct { type GlobalCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.globalClusterIdentifier)",message="globalClusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.globalClusterIdentifier) || (has(self.initProvider) && has(self.initProvider.globalClusterIdentifier))",message="spec.forProvider.globalClusterIdentifier is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec GlobalClusterSpec `json:"spec"` Status GlobalClusterStatus `json:"status,omitempty"` } diff --git a/apis/docdb/v1alpha1/zz_groupversion_info.go b/apis/docdb/v1alpha1/zz_groupversion_info.go index b446986..d64a3ad 100755 --- a/apis/docdb/v1alpha1/zz_groupversion_info.go +++ b/apis/docdb/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/docdb/v1alpha1/zz_subnetgroup_types.go b/apis/docdb/v1alpha1/zz_subnetgroup_types.go index ac9d6e5..f3619bf 100755 --- a/apis/docdb/v1alpha1/zz_subnetgroup_types.go +++ b/apis/docdb/v1alpha1/zz_subnetgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SubnetGroupInitParameters struct { + + // The description of the docDB subnet group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SubnetGroupObservation struct { // The ARN of the docDB subnet group. @@ -46,7 +62,7 @@ type SubnetGroupParameters struct { Region *string `json:"region,omitempty" tf:"-"` // A list of VPC subnet IDs. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet // +kubebuilder:validation:Optional SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` @@ -71,6 +87,17 @@ type SubnetGroupParameters struct { type SubnetGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SubnetGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SubnetGroupInitParameters `json:"initProvider,omitempty"` } // SubnetGroupStatus defines the observed state of SubnetGroup. @@ -91,7 +118,7 @@ type SubnetGroupStatus struct { type SubnetGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SubnetGroupSpec `json:"spec"` Status SubnetGroupStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_contributorinsights_types.go b/apis/dynamodb/v1alpha1/zz_contributorinsights_types.go index 33ceaf2..dd031a9 100755 --- a/apis/dynamodb/v1alpha1/zz_contributorinsights_types.go +++ b/apis/dynamodb/v1alpha1/zz_contributorinsights_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ContributorInsightsInitParameters struct { + + // The global secondary index name + IndexName *string `json:"indexName,omitempty" tf:"index_name,omitempty"` +} + type ContributorInsightsObservation struct { ID *string `json:"id,omitempty" tf:"id,omitempty"` @@ -52,6 +62,17 @@ type ContributorInsightsParameters struct { type ContributorInsightsSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ContributorInsightsParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ContributorInsightsInitParameters `json:"initProvider,omitempty"` } // ContributorInsightsStatus defines the observed state of ContributorInsights. @@ -72,7 +93,7 @@ type ContributorInsightsStatus struct { type ContributorInsights struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ContributorInsightsSpec `json:"spec"` Status ContributorInsightsStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_generated.deepcopy.go b/apis/dynamodb/v1alpha1/zz_generated.deepcopy.go index dfde9c2..aa1ae99 100644 --- a/apis/dynamodb/v1alpha1/zz_generated.deepcopy.go +++ b/apis/dynamodb/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,31 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AttributeInitParameters) DeepCopyInto(out *AttributeInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttributeInitParameters. +func (in *AttributeInitParameters) DeepCopy() *AttributeInitParameters { + if in == nil { + return nil + } + out := new(AttributeInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AttributeObservation) DeepCopyInto(out *AttributeObservation) { *out = *in @@ -91,6 +115,26 @@ func (in *ContributorInsights) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContributorInsightsInitParameters) DeepCopyInto(out *ContributorInsightsInitParameters) { + *out = *in + if in.IndexName != nil { + in, out := &in.IndexName, &out.IndexName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContributorInsightsInitParameters. +func (in *ContributorInsightsInitParameters) DeepCopy() *ContributorInsightsInitParameters { + if in == nil { + return nil + } + out := new(ContributorInsightsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ContributorInsightsList) DeepCopyInto(out *ContributorInsightsList) { *out = *in @@ -198,6 +242,7 @@ func (in *ContributorInsightsSpec) DeepCopyInto(out *ContributorInsightsSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContributorInsightsSpec. @@ -227,6 +272,62 @@ func (in *ContributorInsightsStatus) DeepCopy() *ContributorInsightsStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalSecondaryIndexInitParameters) DeepCopyInto(out *GlobalSecondaryIndexInitParameters) { + *out = *in + if in.HashKey != nil { + in, out := &in.HashKey, &out.HashKey + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NonKeyAttributes != nil { + in, out := &in.NonKeyAttributes, &out.NonKeyAttributes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ProjectionType != nil { + in, out := &in.ProjectionType, &out.ProjectionType + *out = new(string) + **out = **in + } + if in.RangeKey != nil { + in, out := &in.RangeKey, &out.RangeKey + *out = new(string) + **out = **in + } + if in.ReadCapacity != nil { + in, out := &in.ReadCapacity, &out.ReadCapacity + *out = new(float64) + **out = **in + } + if in.WriteCapacity != nil { + in, out := &in.WriteCapacity, &out.WriteCapacity + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalSecondaryIndexInitParameters. +func (in *GlobalSecondaryIndexInitParameters) DeepCopy() *GlobalSecondaryIndexInitParameters { + if in == nil { + return nil + } + out := new(GlobalSecondaryIndexInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalSecondaryIndexObservation) DeepCopyInto(out *GlobalSecondaryIndexObservation) { *out = *in @@ -366,6 +467,28 @@ func (in *GlobalTable) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalTableInitParameters) DeepCopyInto(out *GlobalTableInitParameters) { + *out = *in + if in.Replica != nil { + in, out := &in.Replica, &out.Replica + *out = make([]ReplicaInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTableInitParameters. +func (in *GlobalTableInitParameters) DeepCopy() *GlobalTableInitParameters { + if in == nil { + return nil + } + out := new(GlobalTableInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalTableList) DeepCopyInto(out *GlobalTableList) { *out = *in @@ -462,6 +585,7 @@ func (in *GlobalTableSpec) DeepCopyInto(out *GlobalTableSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTableSpec. @@ -518,6 +642,21 @@ func (in *KinesisStreamingDestination) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KinesisStreamingDestinationInitParameters) DeepCopyInto(out *KinesisStreamingDestinationInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KinesisStreamingDestinationInitParameters. +func (in *KinesisStreamingDestinationInitParameters) DeepCopy() *KinesisStreamingDestinationInitParameters { + if in == nil { + return nil + } + out := new(KinesisStreamingDestinationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KinesisStreamingDestinationList) DeepCopyInto(out *KinesisStreamingDestinationList) { *out = *in @@ -635,6 +774,7 @@ func (in *KinesisStreamingDestinationSpec) DeepCopyInto(out *KinesisStreamingDes *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + out.InitProvider = in.InitProvider } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KinesisStreamingDestinationSpec. @@ -664,6 +804,47 @@ func (in *KinesisStreamingDestinationStatus) DeepCopy() *KinesisStreamingDestina return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalSecondaryIndexInitParameters) DeepCopyInto(out *LocalSecondaryIndexInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NonKeyAttributes != nil { + in, out := &in.NonKeyAttributes, &out.NonKeyAttributes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ProjectionType != nil { + in, out := &in.ProjectionType, &out.ProjectionType + *out = new(string) + **out = **in + } + if in.RangeKey != nil { + in, out := &in.RangeKey, &out.RangeKey + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecondaryIndexInitParameters. +func (in *LocalSecondaryIndexInitParameters) DeepCopy() *LocalSecondaryIndexInitParameters { + if in == nil { + return nil + } + out := new(LocalSecondaryIndexInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LocalSecondaryIndexObservation) DeepCopyInto(out *LocalSecondaryIndexObservation) { *out = *in @@ -746,6 +927,26 @@ func (in *LocalSecondaryIndexParameters) DeepCopy() *LocalSecondaryIndexParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PointInTimeRecoveryInitParameters) DeepCopyInto(out *PointInTimeRecoveryInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PointInTimeRecoveryInitParameters. +func (in *PointInTimeRecoveryInitParameters) DeepCopy() *PointInTimeRecoveryInitParameters { + if in == nil { + return nil + } + out := new(PointInTimeRecoveryInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PointInTimeRecoveryObservation) DeepCopyInto(out *PointInTimeRecoveryObservation) { *out = *in @@ -786,6 +987,26 @@ func (in *PointInTimeRecoveryParameters) DeepCopy() *PointInTimeRecoveryParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicaInitParameters) DeepCopyInto(out *ReplicaInitParameters) { + *out = *in + if in.RegionName != nil { + in, out := &in.RegionName, &out.RegionName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaInitParameters. +func (in *ReplicaInitParameters) DeepCopy() *ReplicaInitParameters { + if in == nil { + return nil + } + out := new(ReplicaInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicaObservation) DeepCopyInto(out *ReplicaObservation) { *out = *in @@ -826,6 +1047,31 @@ func (in *ReplicaParameters) DeepCopy() *ReplicaParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerSideEncryptionInitParameters) DeepCopyInto(out *ServerSideEncryptionInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KMSKeyArn != nil { + in, out := &in.KMSKeyArn, &out.KMSKeyArn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSideEncryptionInitParameters. +func (in *ServerSideEncryptionInitParameters) DeepCopy() *ServerSideEncryptionInitParameters { + if in == nil { + return nil + } + out := new(ServerSideEncryptionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServerSideEncryptionObservation) DeepCopyInto(out *ServerSideEncryptionObservation) { *out = *in @@ -876,6 +1122,31 @@ func (in *ServerSideEncryptionParameters) DeepCopy() *ServerSideEncryptionParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TTLInitParameters) DeepCopyInto(out *TTLInitParameters) { + *out = *in + if in.AttributeName != nil { + in, out := &in.AttributeName, &out.AttributeName + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TTLInitParameters. +func (in *TTLInitParameters) DeepCopy() *TTLInitParameters { + if in == nil { + return nil + } + out := new(TTLInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TTLObservation) DeepCopyInto(out *TTLObservation) { *out = *in @@ -953,6 +1224,162 @@ func (in *Table) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableInitParameters) DeepCopyInto(out *TableInitParameters) { + *out = *in + if in.Attribute != nil { + in, out := &in.Attribute, &out.Attribute + *out = make([]AttributeInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BillingMode != nil { + in, out := &in.BillingMode, &out.BillingMode + *out = new(string) + **out = **in + } + if in.DeletionProtectionEnabled != nil { + in, out := &in.DeletionProtectionEnabled, &out.DeletionProtectionEnabled + *out = new(bool) + **out = **in + } + if in.GlobalSecondaryIndex != nil { + in, out := &in.GlobalSecondaryIndex, &out.GlobalSecondaryIndex + *out = make([]GlobalSecondaryIndexInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HashKey != nil { + in, out := &in.HashKey, &out.HashKey + *out = new(string) + **out = **in + } + if in.LocalSecondaryIndex != nil { + in, out := &in.LocalSecondaryIndex, &out.LocalSecondaryIndex + *out = make([]LocalSecondaryIndexInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PointInTimeRecovery != nil { + in, out := &in.PointInTimeRecovery, &out.PointInTimeRecovery + *out = make([]PointInTimeRecoveryInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RangeKey != nil { + in, out := &in.RangeKey, &out.RangeKey + *out = new(string) + **out = **in + } + if in.ReadCapacity != nil { + in, out := &in.ReadCapacity, &out.ReadCapacity + *out = new(float64) + **out = **in + } + if in.Replica != nil { + in, out := &in.Replica, &out.Replica + *out = make([]TableReplicaInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RestoreDateTime != nil { + in, out := &in.RestoreDateTime, &out.RestoreDateTime + *out = new(string) + **out = **in + } + if in.RestoreSourceName != nil { + in, out := &in.RestoreSourceName, &out.RestoreSourceName + *out = new(string) + **out = **in + } + if in.RestoreToLatestTime != nil { + in, out := &in.RestoreToLatestTime, &out.RestoreToLatestTime + *out = new(bool) + **out = **in + } + if in.ServerSideEncryption != nil { + in, out := &in.ServerSideEncryption, &out.ServerSideEncryption + *out = make([]ServerSideEncryptionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StreamEnabled != nil { + in, out := &in.StreamEnabled, &out.StreamEnabled + *out = new(bool) + **out = **in + } + if in.StreamViewType != nil { + in, out := &in.StreamViewType, &out.StreamViewType + *out = new(string) + **out = **in + } + if in.TTL != nil { + in, out := &in.TTL, &out.TTL + *out = make([]TTLInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TableClass != nil { + in, out := &in.TableClass, &out.TableClass + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.WriteCapacity != nil { + in, out := &in.WriteCapacity, &out.WriteCapacity + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableInitParameters. +func (in *TableInitParameters) DeepCopy() *TableInitParameters { + if in == nil { + return nil + } + out := new(TableInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TableItem) DeepCopyInto(out *TableItem) { *out = *in @@ -980,6 +1407,36 @@ func (in *TableItem) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableItemInitParameters) DeepCopyInto(out *TableItemInitParameters) { + *out = *in + if in.HashKey != nil { + in, out := &in.HashKey, &out.HashKey + *out = new(string) + **out = **in + } + if in.Item != nil { + in, out := &in.Item, &out.Item + *out = new(string) + **out = **in + } + if in.RangeKey != nil { + in, out := &in.RangeKey, &out.RangeKey + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableItemInitParameters. +func (in *TableItemInitParameters) DeepCopy() *TableItemInitParameters { + if in == nil { + return nil + } + out := new(TableItemInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TableItemList) DeepCopyInto(out *TableItemList) { *out = *in @@ -1107,6 +1564,7 @@ func (in *TableItemSpec) DeepCopyInto(out *TableItemSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableItemSpec. @@ -1303,7 +1761,8 @@ func (in *TableObservation) DeepCopyInto(out *TableObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1318,7 +1777,8 @@ func (in *TableObservation) DeepCopyInto(out *TableObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1462,7 +1922,8 @@ func (in *TableParameters) DeepCopyInto(out *TableParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1477,7 +1938,8 @@ func (in *TableParameters) DeepCopyInto(out *TableParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1528,6 +1990,98 @@ func (in *TableReplica) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableReplicaInitParameters) DeepCopyInto(out *TableReplicaInitParameters) { + *out = *in + if in.KMSKeyArn != nil { + in, out := &in.KMSKeyArn, &out.KMSKeyArn + *out = new(string) + **out = **in + } + if in.PointInTimeRecovery != nil { + in, out := &in.PointInTimeRecovery, &out.PointInTimeRecovery + *out = new(bool) + **out = **in + } + if in.PropagateTags != nil { + in, out := &in.PropagateTags, &out.PropagateTags + *out = new(bool) + **out = **in + } + if in.RegionName != nil { + in, out := &in.RegionName, &out.RegionName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableReplicaInitParameters. +func (in *TableReplicaInitParameters) DeepCopy() *TableReplicaInitParameters { + if in == nil { + return nil + } + out := new(TableReplicaInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TableReplicaInitParameters_2) DeepCopyInto(out *TableReplicaInitParameters_2) { + *out = *in + if in.PointInTimeRecovery != nil { + in, out := &in.PointInTimeRecovery, &out.PointInTimeRecovery + *out = new(bool) + **out = **in + } + if in.TableClassOverride != nil { + in, out := &in.TableClassOverride, &out.TableClassOverride + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableReplicaInitParameters_2. +func (in *TableReplicaInitParameters_2) DeepCopy() *TableReplicaInitParameters_2 { + if in == nil { + return nil + } + out := new(TableReplicaInitParameters_2) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TableReplicaList) DeepCopyInto(out *TableReplicaList) { *out = *in @@ -1651,7 +2205,8 @@ func (in *TableReplicaObservation_2) DeepCopyInto(out *TableReplicaObservation_2 if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1666,7 +2221,8 @@ func (in *TableReplicaObservation_2) DeepCopyInto(out *TableReplicaObservation_2 if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1728,11 +2284,31 @@ func (in *TableReplicaParameters_2) DeepCopyInto(out *TableReplicaParameters_2) *out = new(string) **out = **in } + if in.GlobalTableArnRef != nil { + in, out := &in.GlobalTableArnRef, &out.GlobalTableArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.GlobalTableArnSelector != nil { + in, out := &in.GlobalTableArnSelector, &out.GlobalTableArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.KMSKeyArn != nil { in, out := &in.KMSKeyArn, &out.KMSKeyArn *out = new(string) **out = **in } + if in.KMSKeyArnRef != nil { + in, out := &in.KMSKeyArnRef, &out.KMSKeyArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyArnSelector != nil { + in, out := &in.KMSKeyArnSelector, &out.KMSKeyArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.PointInTimeRecovery != nil { in, out := &in.PointInTimeRecovery, &out.PointInTimeRecovery *out = new(bool) @@ -1756,7 +2332,8 @@ func (in *TableReplicaParameters_2) DeepCopyInto(out *TableReplicaParameters_2) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1771,7 +2348,8 @@ func (in *TableReplicaParameters_2) DeepCopyInto(out *TableReplicaParameters_2) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1795,6 +2373,7 @@ func (in *TableReplicaSpec) DeepCopyInto(out *TableReplicaSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableReplicaSpec. @@ -1829,6 +2408,7 @@ func (in *TableSpec) DeepCopyInto(out *TableSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TableSpec. @@ -1885,6 +2465,26 @@ func (in *Tag) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagInitParameters) DeepCopyInto(out *TagInitParameters) { + *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagInitParameters. +func (in *TagInitParameters) DeepCopy() *TagInitParameters { + if in == nil { + return nil + } + out := new(TagInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TagList) DeepCopyInto(out *TagList) { *out = *in @@ -1992,6 +2592,7 @@ func (in *TagSpec) DeepCopyInto(out *TagSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagSpec. diff --git a/apis/dynamodb/v1alpha1/zz_generated.managed.go b/apis/dynamodb/v1alpha1/zz_generated.managed.go index 3886437..8fca001 100644 --- a/apis/dynamodb/v1alpha1/zz_generated.managed.go +++ b/apis/dynamodb/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *ContributorInsights) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ContributorInsights. -func (mg *ContributorInsights) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ContributorInsights. +func (mg *ContributorInsights) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ContributorInsights. @@ -27,14 +27,6 @@ func (mg *ContributorInsights) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ContributorInsights. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ContributorInsights) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ContributorInsights. func (mg *ContributorInsights) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *ContributorInsights) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ContributorInsights. -func (mg *ContributorInsights) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ContributorInsights. +func (mg *ContributorInsights) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ContributorInsights. @@ -65,14 +57,6 @@ func (mg *ContributorInsights) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ContributorInsights. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ContributorInsights) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ContributorInsights. func (mg *ContributorInsights) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *GlobalTable) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this GlobalTable. -func (mg *GlobalTable) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this GlobalTable. +func (mg *GlobalTable) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this GlobalTable. @@ -103,14 +87,6 @@ func (mg *GlobalTable) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this GlobalTable. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *GlobalTable) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this GlobalTable. func (mg *GlobalTable) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *GlobalTable) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this GlobalTable. -func (mg *GlobalTable) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this GlobalTable. +func (mg *GlobalTable) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this GlobalTable. @@ -141,14 +117,6 @@ func (mg *GlobalTable) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this GlobalTable. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *GlobalTable) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this GlobalTable. func (mg *GlobalTable) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *KinesisStreamingDestination) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this KinesisStreamingDestination. -func (mg *KinesisStreamingDestination) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this KinesisStreamingDestination. +func (mg *KinesisStreamingDestination) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this KinesisStreamingDestination. @@ -179,14 +147,6 @@ func (mg *KinesisStreamingDestination) GetProviderConfigReference() *xpv1.Refere return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this KinesisStreamingDestination. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *KinesisStreamingDestination) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this KinesisStreamingDestination. func (mg *KinesisStreamingDestination) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *KinesisStreamingDestination) SetDeletionPolicy(r xpv1.DeletionPolicy) mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this KinesisStreamingDestination. -func (mg *KinesisStreamingDestination) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this KinesisStreamingDestination. +func (mg *KinesisStreamingDestination) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this KinesisStreamingDestination. @@ -217,14 +177,6 @@ func (mg *KinesisStreamingDestination) SetProviderConfigReference(r *xpv1.Refere mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this KinesisStreamingDestination. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *KinesisStreamingDestination) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this KinesisStreamingDestination. func (mg *KinesisStreamingDestination) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -245,9 +197,9 @@ func (mg *Table) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Table. -func (mg *Table) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Table. +func (mg *Table) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Table. @@ -255,14 +207,6 @@ func (mg *Table) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Table. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Table) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Table. func (mg *Table) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -283,9 +227,9 @@ func (mg *Table) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Table. -func (mg *Table) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Table. +func (mg *Table) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Table. @@ -293,14 +237,6 @@ func (mg *Table) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Table. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Table) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Table. func (mg *Table) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -321,9 +257,9 @@ func (mg *TableItem) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this TableItem. -func (mg *TableItem) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this TableItem. +func (mg *TableItem) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this TableItem. @@ -331,14 +267,6 @@ func (mg *TableItem) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this TableItem. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *TableItem) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this TableItem. func (mg *TableItem) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -359,9 +287,9 @@ func (mg *TableItem) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this TableItem. -func (mg *TableItem) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this TableItem. +func (mg *TableItem) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this TableItem. @@ -369,14 +297,6 @@ func (mg *TableItem) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this TableItem. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *TableItem) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this TableItem. func (mg *TableItem) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -397,9 +317,9 @@ func (mg *TableReplica) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this TableReplica. -func (mg *TableReplica) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this TableReplica. +func (mg *TableReplica) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this TableReplica. @@ -407,14 +327,6 @@ func (mg *TableReplica) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this TableReplica. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *TableReplica) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this TableReplica. func (mg *TableReplica) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -435,9 +347,9 @@ func (mg *TableReplica) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this TableReplica. -func (mg *TableReplica) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this TableReplica. +func (mg *TableReplica) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this TableReplica. @@ -445,14 +357,6 @@ func (mg *TableReplica) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this TableReplica. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *TableReplica) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this TableReplica. func (mg *TableReplica) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -473,9 +377,9 @@ func (mg *Tag) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Tag. -func (mg *Tag) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Tag. +func (mg *Tag) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Tag. @@ -483,14 +387,6 @@ func (mg *Tag) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Tag. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Tag) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Tag. func (mg *Tag) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -511,9 +407,9 @@ func (mg *Tag) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Tag. -func (mg *Tag) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Tag. +func (mg *Tag) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Tag. @@ -521,14 +417,6 @@ func (mg *Tag) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Tag. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Tag) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Tag. func (mg *Tag) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/dynamodb/v1alpha1/zz_generated.resolvers.go b/apis/dynamodb/v1alpha1/zz_generated.resolvers.go index fd21114..62ce945 100644 --- a/apis/dynamodb/v1alpha1/zz_generated.resolvers.go +++ b/apis/dynamodb/v1alpha1/zz_generated.resolvers.go @@ -8,9 +8,11 @@ package v1alpha1 import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - common "github.com/upbound/provider-aws/config/common" v1alpha1 "kubedb.dev/provider-aws/apis/kinesis/v1alpha1" + v1alpha11 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + common "kubedb.dev/provider-aws/config/common" client "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -107,3 +109,45 @@ func (mg *TableItem) ResolveReferences(ctx context.Context, c client.Reader) err return nil } + +// ResolveReferences of this TableReplica. +func (mg *TableReplica) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.GlobalTableArn), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.GlobalTableArnRef, + Selector: mg.Spec.ForProvider.GlobalTableArnSelector, + To: reference.To{ + List: &TableList{}, + Managed: &Table{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.GlobalTableArn") + } + mg.Spec.ForProvider.GlobalTableArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.GlobalTableArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyArnRef, + Selector: mg.Spec.ForProvider.KMSKeyArnSelector, + To: reference.To{ + List: &v1alpha11.KeyList{}, + Managed: &v1alpha11.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyArn") + } + mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/dynamodb/v1alpha1/zz_generated_terraformed.go b/apis/dynamodb/v1alpha1/zz_generated_terraformed.go index d4a8527..eac95e4 100755 --- a/apis/dynamodb/v1alpha1/zz_generated_terraformed.go +++ b/apis/dynamodb/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this ContributorInsights @@ -69,6 +74,46 @@ func (tr *ContributorInsights) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ContributorInsights +func (tr *ContributorInsights) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ContributorInsights +func (tr *ContributorInsights) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ContributorInsights using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ContributorInsights) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *GlobalTable) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this GlobalTable +func (tr *GlobalTable) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalTable +func (tr *GlobalTable) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this GlobalTable using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *GlobalTable) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *KinesisStreamingDestination) SetParameters(params map[string]any) erro return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this KinesisStreamingDestination +func (tr *KinesisStreamingDestination) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this KinesisStreamingDestination +func (tr *KinesisStreamingDestination) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this KinesisStreamingDestination using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *KinesisStreamingDestination) LateInitialize(attrs []byte) (bool, error) { @@ -291,6 +416,46 @@ func (tr *Table) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Table +func (tr *Table) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Table +func (tr *Table) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Table using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Table) LateInitialize(attrs []byte) (bool, error) { @@ -365,6 +530,46 @@ func (tr *TableItem) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this TableItem +func (tr *TableItem) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this TableItem +func (tr *TableItem) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this TableItem using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *TableItem) LateInitialize(attrs []byte) (bool, error) { @@ -439,6 +644,46 @@ func (tr *TableReplica) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this TableReplica +func (tr *TableReplica) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this TableReplica +func (tr *TableReplica) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this TableReplica using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *TableReplica) LateInitialize(attrs []byte) (bool, error) { @@ -513,6 +758,46 @@ func (tr *Tag) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Tag +func (tr *Tag) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Tag +func (tr *Tag) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Tag using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Tag) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/dynamodb/v1alpha1/zz_globaltable_types.go b/apis/dynamodb/v1alpha1/zz_globaltable_types.go index 0c90cbe..e89d191 100755 --- a/apis/dynamodb/v1alpha1/zz_globaltable_types.go +++ b/apis/dynamodb/v1alpha1/zz_globaltable_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type GlobalTableInitParameters struct { + + // Underlying DynamoDB Table. At least 1 replica must be defined. See below. + Replica []ReplicaInitParameters `json:"replica,omitempty" tf:"replica,omitempty"` +} + type GlobalTableObservation struct { // The ARN of the DynamoDB Global Table @@ -37,6 +47,12 @@ type GlobalTableParameters struct { Replica []ReplicaParameters `json:"replica,omitempty" tf:"replica,omitempty"` } +type ReplicaInitParameters struct { + + // AWS region name of replica DynamoDB TableE.g., us-east-1 + RegionName *string `json:"regionName,omitempty" tf:"region_name,omitempty"` +} + type ReplicaObservation struct { // AWS region name of replica DynamoDB TableE.g., us-east-1 @@ -46,7 +62,7 @@ type ReplicaObservation struct { type ReplicaParameters struct { // AWS region name of replica DynamoDB TableE.g., us-east-1 - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional RegionName *string `json:"regionName" tf:"region_name,omitempty"` } @@ -54,6 +70,17 @@ type ReplicaParameters struct { type GlobalTableSpec struct { v1.ResourceSpec `json:",inline"` ForProvider GlobalTableParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 GlobalTableInitParameters `json:"initProvider,omitempty"` } // GlobalTableStatus defines the observed state of GlobalTable. @@ -74,8 +101,8 @@ type GlobalTableStatus struct { type GlobalTable struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.replica)",message="replica is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.replica) || (has(self.initProvider) && has(self.initProvider.replica))",message="spec.forProvider.replica is a required parameter" Spec GlobalTableSpec `json:"spec"` Status GlobalTableStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_groupversion_info.go b/apis/dynamodb/v1alpha1/zz_groupversion_info.go index 5c64650..0929789 100755 --- a/apis/dynamodb/v1alpha1/zz_groupversion_info.go +++ b/apis/dynamodb/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/dynamodb/v1alpha1/zz_kinesisstreamingdestination_types.go b/apis/dynamodb/v1alpha1/zz_kinesisstreamingdestination_types.go index 08404df..6bd38da 100755 --- a/apis/dynamodb/v1alpha1/zz_kinesisstreamingdestination_types.go +++ b/apis/dynamodb/v1alpha1/zz_kinesisstreamingdestination_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,9 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type KinesisStreamingDestinationInitParameters struct { +} + type KinesisStreamingDestinationObservation struct { // The table_name and stream_arn separated by a comma (,). @@ -35,7 +42,7 @@ type KinesisStreamingDestinationParameters struct { // The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table. // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kinesis/v1alpha1.Stream - // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.TerraformID() + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.TerraformID() // +kubebuilder:validation:Optional StreamArn *string `json:"streamArn,omitempty" tf:"stream_arn,omitempty"` @@ -66,6 +73,17 @@ type KinesisStreamingDestinationParameters struct { type KinesisStreamingDestinationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider KinesisStreamingDestinationParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 KinesisStreamingDestinationInitParameters `json:"initProvider,omitempty"` } // KinesisStreamingDestinationStatus defines the observed state of KinesisStreamingDestination. @@ -86,7 +104,7 @@ type KinesisStreamingDestinationStatus struct { type KinesisStreamingDestination struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec KinesisStreamingDestinationSpec `json:"spec"` Status KinesisStreamingDestinationStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_table_types.go b/apis/dynamodb/v1alpha1/zz_table_types.go index 9fe58f1..a9fc92d 100755 --- a/apis/dynamodb/v1alpha1/zz_table_types.go +++ b/apis/dynamodb/v1alpha1/zz_table_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,15 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AttributeInitParameters struct { + + // Name of the attribute + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Attribute type. Valid values are S (string), N (number), B (binary). + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + type AttributeObservation struct { // Name of the attribute @@ -25,14 +38,38 @@ type AttributeObservation struct { type AttributeParameters struct { // Name of the attribute - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // Attribute type. Valid values are S (string), N (number), B (binary). - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Type *string `json:"type" tf:"type,omitempty"` } +type GlobalSecondaryIndexInitParameters struct { + + // Name of the hash key in the index; must be defined as an attribute in the resource. + HashKey *string `json:"hashKey,omitempty" tf:"hash_key,omitempty"` + + // Name of the index. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table. + NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"` + + // One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project. + ProjectionType *string `json:"projectionType,omitempty" tf:"projection_type,omitempty"` + + // Name of the range key; must be defined + RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"` + + // Number of read units for this index. Must be set if billing_mode is set to PROVISIONED. + ReadCapacity *float64 `json:"readCapacity,omitempty" tf:"read_capacity,omitempty"` + + // Number of write units for this index. Must be set if billing_mode is set to PROVISIONED. + WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"` +} + type GlobalSecondaryIndexObservation struct { // Name of the hash key in the index; must be defined as an attribute in the resource. @@ -60,11 +97,11 @@ type GlobalSecondaryIndexObservation struct { type GlobalSecondaryIndexParameters struct { // Name of the hash key in the index; must be defined as an attribute in the resource. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional HashKey *string `json:"hashKey" tf:"hash_key,omitempty"` // Name of the index. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table. @@ -72,7 +109,7 @@ type GlobalSecondaryIndexParameters struct { NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"` // One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"` // Name of the range key; must be defined @@ -88,6 +125,21 @@ type GlobalSecondaryIndexParameters struct { WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"` } +type LocalSecondaryIndexInitParameters struct { + + // Name of the index + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table. + NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"` + + // One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project. + ProjectionType *string `json:"projectionType,omitempty" tf:"projection_type,omitempty"` + + // Name of the range key. + RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"` +} + type LocalSecondaryIndexObservation struct { // Name of the index @@ -106,7 +158,7 @@ type LocalSecondaryIndexObservation struct { type LocalSecondaryIndexParameters struct { // Name of the index - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table. @@ -114,14 +166,20 @@ type LocalSecondaryIndexParameters struct { NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"` // One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"` // Name of the range key. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional RangeKey *string `json:"rangeKey" tf:"range_key,omitempty"` } +type PointInTimeRecoveryInitParameters struct { + + // Whether to enable point-in-time recovery. It can take 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided, this defaults to false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type PointInTimeRecoveryObservation struct { // Whether to enable point-in-time recovery. It can take 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided, this defaults to false. @@ -131,10 +189,19 @@ type PointInTimeRecoveryObservation struct { type PointInTimeRecoveryParameters struct { // Whether to enable point-in-time recovery. It can take 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided, this defaults to false. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` } +type ServerSideEncryptionInitParameters struct { + + // Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK). If enabled is false then server-side encryption is set to AWS-owned key (shown as DEFAULT in the AWS console). Potentially confusingly, if enabled is true and no kms_key_arn is specified then server-side encryption is set to the default KMS-managed key (shown as KMS in the AWS console). The AWS KMS documentation explains the difference between AWS-owned and KMS-managed keys. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys. + KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` +} + type ServerSideEncryptionObservation struct { // Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK). If enabled is false then server-side encryption is set to AWS-owned key (shown as DEFAULT in the AWS console). Potentially confusingly, if enabled is true and no kms_key_arn is specified then server-side encryption is set to the default KMS-managed key (shown as KMS in the AWS console). The AWS KMS documentation explains the difference between AWS-owned and KMS-managed keys. @@ -147,7 +214,7 @@ type ServerSideEncryptionObservation struct { type ServerSideEncryptionParameters struct { // Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK). If enabled is false then server-side encryption is set to AWS-owned key (shown as DEFAULT in the AWS console). Potentially confusingly, if enabled is true and no kms_key_arn is specified then server-side encryption is set to the default KMS-managed key (shown as KMS in the AWS console). The AWS KMS documentation explains the difference between AWS-owned and KMS-managed keys. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys. @@ -155,6 +222,15 @@ type ServerSideEncryptionParameters struct { KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` } +type TTLInitParameters struct { + + // Name of the table attribute to store the TTL timestamp in. + AttributeName *string `json:"attributeName,omitempty" tf:"attribute_name,omitempty"` + + // Whether TTL is enabled. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type TTLObservation struct { // Name of the table attribute to store the TTL timestamp in. @@ -167,7 +243,7 @@ type TTLObservation struct { type TTLParameters struct { // Name of the table attribute to store the TTL timestamp in. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional AttributeName *string `json:"attributeName" tf:"attribute_name,omitempty"` // Whether TTL is enabled. @@ -175,6 +251,74 @@ type TTLParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } +type TableInitParameters struct { + + // Set of nested attribute definitions. Only required for hash_key and range_key attributes. See below. + Attribute []AttributeInitParameters `json:"attribute,omitempty" tf:"attribute,omitempty"` + + // Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED. + BillingMode *string `json:"billingMode,omitempty" tf:"billing_mode,omitempty"` + + // Enables deletion protection for table. Defaults to false. + DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` + + // Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc. See below. + GlobalSecondaryIndex []GlobalSecondaryIndexInitParameters `json:"globalSecondaryIndex,omitempty" tf:"global_secondary_index,omitempty"` + + // Attribute to use as the hash (partition) key. Must also be defined as an attribute. See below. + HashKey *string `json:"hashKey,omitempty" tf:"hash_key,omitempty"` + + // Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource. See below. + LocalSecondaryIndex []LocalSecondaryIndexInitParameters `json:"localSecondaryIndex,omitempty" tf:"local_secondary_index,omitempty"` + + // Enable point-in-time recovery options. See below. + PointInTimeRecovery []PointInTimeRecoveryInitParameters `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"` + + // Attribute to use as the range (sort) key. Must also be defined as an attribute, see below. + RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"` + + // Number of read units for this table. If the billing_mode is PROVISIONED, this field is required. + ReadCapacity *float64 `json:"readCapacity,omitempty" tf:"read_capacity,omitempty"` + + // Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. See below. + Replica []TableReplicaInitParameters `json:"replica,omitempty" tf:"replica,omitempty"` + + // Time of the point-in-time recovery point to restore. + RestoreDateTime *string `json:"restoreDateTime,omitempty" tf:"restore_date_time,omitempty"` + + // Name of the table to restore. Must match the name of an existing table. + RestoreSourceName *string `json:"restoreSourceName,omitempty" tf:"restore_source_name,omitempty"` + + // If set, restores table to the most recent point-in-time recovery point. + RestoreToLatestTime *bool `json:"restoreToLatestTime,omitempty" tf:"restore_to_latest_time,omitempty"` + + // Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS-owned Customer Master Key if this argument isn't specified. See below. + ServerSideEncryption []ServerSideEncryptionInitParameters `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"` + + // Whether Streams are enabled. + StreamEnabled *bool `json:"streamEnabled,omitempty" tf:"stream_enabled,omitempty"` + + // When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES. + StreamViewType *string `json:"streamViewType,omitempty" tf:"stream_view_type,omitempty"` + + // Configuration block for TTL. See below. + TTL []TTLInitParameters `json:"ttl,omitempty" tf:"ttl,omitempty"` + + // Storage class of the table. + // Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. + // Default value is STANDARD. + TableClass *string `json:"tableClass,omitempty" tf:"table_class,omitempty"` + + // A map of tags to populate on the created table. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Number of write units for this table. If the billing_mode is PROVISIONED, this field is required. + WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"` +} + type TableObservation struct { // ARN of the table @@ -349,6 +493,21 @@ type TableParameters struct { WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"` } +type TableReplicaInitParameters struct { + + // ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys. + KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` + + // Whether to enable Point In Time Recovery for the replica. Default is false. + PointInTimeRecovery *bool `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"` + + // Whether to propagate the global table's tags to a replica. Default is false. Changes to tags only move in one direction: from global (source) to replica. In other words, tag drift on a replica will not trigger an update. Tag or replica changes on the global table, whether from drift or configuration changes, are propagated to replicas. Changing from true to false on a subsequent apply means replica tags are left as they were, unmanaged, not deleted. + PropagateTags *bool `json:"propagateTags,omitempty" tf:"propagate_tags,omitempty"` + + // Region name of the replica. + RegionName *string `json:"regionName,omitempty" tf:"region_name,omitempty"` +} + type TableReplicaObservation struct { // ARN of the replica @@ -388,7 +547,7 @@ type TableReplicaParameters struct { PropagateTags *bool `json:"propagateTags,omitempty" tf:"propagate_tags,omitempty"` // Region name of the replica. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional RegionName *string `json:"regionName" tf:"region_name,omitempty"` } @@ -396,6 +555,17 @@ type TableReplicaParameters struct { type TableSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TableParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider TableInitParameters `json:"initProvider,omitempty"` } // TableStatus defines the observed state of Table. @@ -416,7 +586,7 @@ type TableStatus struct { type Table struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec TableSpec `json:"spec"` Status TableStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_tableitem_types.go b/apis/dynamodb/v1alpha1/zz_tableitem_types.go index 7548e6f..0d230f4 100755 --- a/apis/dynamodb/v1alpha1/zz_tableitem_types.go +++ b/apis/dynamodb/v1alpha1/zz_tableitem_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type TableItemInitParameters struct { + + // Hash key to use for lookups and identification of the item + HashKey *string `json:"hashKey,omitempty" tf:"hash_key,omitempty"` + + // JSON representation of a map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. + Item *string `json:"item,omitempty" tf:"item,omitempty"` + + // Range key to use for lookups and identification of the item. Required if there is range key defined in the table. + RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"` +} + type TableItemObservation struct { // Hash key to use for lookups and identification of the item @@ -67,6 +83,17 @@ type TableItemParameters struct { type TableItemSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TableItemParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 TableItemInitParameters `json:"initProvider,omitempty"` } // TableItemStatus defines the observed state of TableItem. @@ -87,9 +114,9 @@ type TableItemStatus struct { type TableItem struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.hashKey)",message="hashKey is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.item)",message="item is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.hashKey) || (has(self.initProvider) && has(self.initProvider.hashKey))",message="spec.forProvider.hashKey is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.item) || (has(self.initProvider) && has(self.initProvider.item))",message="spec.forProvider.item is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec TableItemSpec `json:"spec"` Status TableItemStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_tablereplica_types.go b/apis/dynamodb/v1alpha1/zz_tablereplica_types.go index 4448189..a0ceb2f 100755 --- a/apis/dynamodb/v1alpha1/zz_tablereplica_types.go +++ b/apis/dynamodb/v1alpha1/zz_tablereplica_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,21 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type TableReplicaInitParameters_2 struct { + + // Whether to enable Point In Time Recovery for the replica. Default is false. + PointInTimeRecovery *bool `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"` + + // Storage class of the table replica. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. If not used, the table replica will use the same class as the global table. + TableClassOverride *string `json:"tableClassOverride,omitempty" tf:"table_class_override,omitempty"` + + // Map of tags to populate on the created table. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type TableReplicaObservation_2 struct { // ARN of the table replica. @@ -43,13 +62,32 @@ type TableReplicaObservation_2 struct { type TableReplicaParameters_2 struct { // ARN of the main or global table which this resource will replicate. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/dynamodb/v1alpha1.Table + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional GlobalTableArn *string `json:"globalTableArn,omitempty" tf:"global_table_arn,omitempty"` + // Reference to a Table in dynamodb to populate globalTableArn. + // +kubebuilder:validation:Optional + GlobalTableArnRef *v1.Reference `json:"globalTableArnRef,omitempty" tf:"-"` + + // Selector for a Table in dynamodb to populate globalTableArn. + // +kubebuilder:validation:Optional + GlobalTableArnSelector *v1.Selector `json:"globalTableArnSelector,omitempty" tf:"-"` + // ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` + // Reference to a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnRef *v1.Reference `json:"kmsKeyArnRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnSelector *v1.Selector `json:"kmsKeyArnSelector,omitempty" tf:"-"` + // Whether to enable Point In Time Recovery for the replica. Default is false. // +kubebuilder:validation:Optional PointInTimeRecovery *bool `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"` @@ -76,6 +114,17 @@ type TableReplicaParameters_2 struct { type TableReplicaSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TableReplicaParameters_2 `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 TableReplicaInitParameters_2 `json:"initProvider,omitempty"` } // TableReplicaStatus defines the observed state of TableReplica. @@ -96,8 +145,7 @@ type TableReplicaStatus struct { type TableReplica struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.globalTableArn)",message="globalTableArn is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec TableReplicaSpec `json:"spec"` Status TableReplicaStatus `json:"status,omitempty"` } diff --git a/apis/dynamodb/v1alpha1/zz_tag_types.go b/apis/dynamodb/v1alpha1/zz_tag_types.go index 7655a8e..f827f1c 100755 --- a/apis/dynamodb/v1alpha1/zz_tag_types.go +++ b/apis/dynamodb/v1alpha1/zz_tag_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type TagInitParameters struct { + + // Tag value. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type TagObservation struct { // DynamoDB resource identifier and key, separated by a comma (,) @@ -52,6 +62,17 @@ type TagParameters struct { type TagSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TagParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 TagInitParameters `json:"initProvider,omitempty"` } // TagStatus defines the observed state of Tag. @@ -72,8 +93,8 @@ type TagStatus struct { type Tag struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.value)",message="value is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" Spec TagSpec `json:"spec"` Status TagStatus `json:"status,omitempty"` } diff --git a/apis/ec2/v1alpha1/zz_generated.deepcopy.go b/apis/ec2/v1alpha1/zz_generated.deepcopy.go index 9ca4f18..d02e342 100644 --- a/apis/ec2/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ec2/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -10,9 +9,30 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AccepterInitParameters) DeepCopyInto(out *AccepterInitParameters) { + *out = *in + if in.AllowRemoteVPCDNSResolution != nil { + in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccepterInitParameters. +func (in *AccepterInitParameters) DeepCopy() *AccepterInitParameters { + if in == nil { + return nil + } + out := new(AccepterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AccepterObservation) DeepCopyInto(out *AccepterObservation) { *out = *in @@ -54,391 +74,3014 @@ func (in *AccepterParameters) DeepCopy() *AccepterParameters { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequesterObservation) DeepCopyInto(out *RequesterObservation) { +func (in *DNSEntryInitParameters) DeepCopyInto(out *DNSEntryInitParameters) { *out = *in - if in.AllowRemoteVPCDNSResolution != nil { - in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution - *out = new(bool) - **out = **in - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterObservation. -func (in *RequesterObservation) DeepCopy() *RequesterObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEntryInitParameters. +func (in *DNSEntryInitParameters) DeepCopy() *DNSEntryInitParameters { if in == nil { return nil } - out := new(RequesterObservation) + out := new(DNSEntryInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequesterParameters) DeepCopyInto(out *RequesterParameters) { +func (in *DNSEntryObservation) DeepCopyInto(out *DNSEntryObservation) { *out = *in - if in.AllowRemoteVPCDNSResolution != nil { - in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution - *out = new(bool) + if in.DNSName != nil { + in, out := &in.DNSName, &out.DNSName + *out = new(string) + **out = **in + } + if in.HostedZoneID != nil { + in, out := &in.HostedZoneID, &out.HostedZoneID + *out = new(string) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterParameters. -func (in *RequesterParameters) DeepCopy() *RequesterParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEntryObservation. +func (in *DNSEntryObservation) DeepCopy() *DNSEntryObservation { if in == nil { return nil } - out := new(RequesterParameters) + out := new(DNSEntryObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route) DeepCopyInto(out *Route) { +func (in *DNSEntryParameters) DeepCopyInto(out *DNSEntryParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. -func (in *Route) DeepCopy() *Route { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEntryParameters. +func (in *DNSEntryParameters) DeepCopy() *DNSEntryParameters { if in == nil { return nil } - out := new(Route) + out := new(DNSEntryParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Route) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteList) DeepCopyInto(out *RouteList) { +func (in *DNSOptionsInitParameters) DeepCopyInto(out *DNSOptionsInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Route, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.DNSRecordIPType != nil { + in, out := &in.DNSRecordIPType, &out.DNSRecordIPType + *out = new(string) + **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList. -func (in *RouteList) DeepCopy() *RouteList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSOptionsInitParameters. +func (in *DNSOptionsInitParameters) DeepCopy() *DNSOptionsInitParameters { if in == nil { return nil } - out := new(RouteList) + out := new(DNSOptionsInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RouteList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteObservation) DeepCopyInto(out *RouteObservation) { +func (in *DNSOptionsObservation) DeepCopyInto(out *DNSOptionsObservation) { *out = *in - if in.CarrierGatewayID != nil { - in, out := &in.CarrierGatewayID, &out.CarrierGatewayID - *out = new(string) - **out = **in - } - if in.CoreNetworkArn != nil { - in, out := &in.CoreNetworkArn, &out.CoreNetworkArn - *out = new(string) - **out = **in - } - if in.DestinationCidrBlock != nil { - in, out := &in.DestinationCidrBlock, &out.DestinationCidrBlock - *out = new(string) - **out = **in - } - if in.DestinationIPv6CidrBlock != nil { - in, out := &in.DestinationIPv6CidrBlock, &out.DestinationIPv6CidrBlock - *out = new(string) - **out = **in - } - if in.DestinationPrefixListID != nil { - in, out := &in.DestinationPrefixListID, &out.DestinationPrefixListID - *out = new(string) - **out = **in - } - if in.EgressOnlyGatewayID != nil { - in, out := &in.EgressOnlyGatewayID, &out.EgressOnlyGatewayID - *out = new(string) - **out = **in - } - if in.GatewayID != nil { - in, out := &in.GatewayID, &out.GatewayID + if in.DNSRecordIPType != nil { + in, out := &in.DNSRecordIPType, &out.DNSRecordIPType *out = new(string) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSOptionsObservation. +func (in *DNSOptionsObservation) DeepCopy() *DNSOptionsObservation { + if in == nil { + return nil } - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID + out := new(DNSOptionsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSOptionsParameters) DeepCopyInto(out *DNSOptionsParameters) { + *out = *in + if in.DNSRecordIPType != nil { + in, out := &in.DNSRecordIPType, &out.DNSRecordIPType *out = new(string) **out = **in } - if in.InstanceOwnerID != nil { - in, out := &in.InstanceOwnerID, &out.InstanceOwnerID - *out = new(string) - **out = **in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSOptionsParameters. +func (in *DNSOptionsParameters) DeepCopy() *DNSOptionsParameters { + if in == nil { + return nil } - if in.LocalGatewayID != nil { - in, out := &in.LocalGatewayID, &out.LocalGatewayID - *out = new(string) - **out = **in + out := new(DNSOptionsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EgressInitParameters) DeepCopyInto(out *EgressInitParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.NATGatewayID != nil { - in, out := &in.NATGatewayID, &out.NATGatewayID + if in.Description != nil { + in, out := &in.Description, &out.Description *out = new(string) **out = **in } - if in.NetworkInterfaceID != nil { - in, out := &in.NetworkInterfaceID, &out.NetworkInterfaceID - *out = new(string) + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) **out = **in } - if in.Origin != nil { - in, out := &in.Origin, &out.Origin - *out = new(string) - **out = **in + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.RouteTableID != nil { - in, out := &in.RouteTableID, &out.RouteTableID - *out = new(string) - **out = **in + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.State != nil { - in, out := &in.State, &out.State + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol *out = new(string) **out = **in } - if in.TransitGatewayID != nil { - in, out := &in.TransitGatewayID, &out.TransitGatewayID - *out = new(string) - **out = **in + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.VPCEndpointID != nil { - in, out := &in.VPCEndpointID, &out.VPCEndpointID - *out = new(string) + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) **out = **in } - if in.VPCPeeringConnectionID != nil { - in, out := &in.VPCPeeringConnectionID, &out.VPCPeeringConnectionID - *out = new(string) + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteObservation. -func (in *RouteObservation) DeepCopy() *RouteObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressInitParameters. +func (in *EgressInitParameters) DeepCopy() *EgressInitParameters { if in == nil { return nil } - out := new(RouteObservation) + out := new(EgressInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteParameters) DeepCopyInto(out *RouteParameters) { +func (in *EgressObservation) DeepCopyInto(out *EgressObservation) { *out = *in - if in.CarrierGatewayID != nil { - in, out := &in.CarrierGatewayID, &out.CarrierGatewayID - *out = new(string) - **out = **in - } - if in.CoreNetworkArn != nil { - in, out := &in.CoreNetworkArn, &out.CoreNetworkArn - *out = new(string) - **out = **in - } - if in.DestinationCidrBlock != nil { - in, out := &in.DestinationCidrBlock, &out.DestinationCidrBlock - *out = new(string) - **out = **in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.DestinationIPv6CidrBlock != nil { - in, out := &in.DestinationIPv6CidrBlock, &out.DestinationIPv6CidrBlock + if in.Description != nil { + in, out := &in.Description, &out.Description *out = new(string) **out = **in } - if in.DestinationPrefixListID != nil { - in, out := &in.DestinationPrefixListID, &out.DestinationPrefixListID - *out = new(string) + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) **out = **in } - if in.EgressOnlyGatewayID != nil { + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressObservation. +func (in *EgressObservation) DeepCopy() *EgressObservation { + if in == nil { + return nil + } + out := new(EgressObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EgressParameters) DeepCopyInto(out *EgressParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressParameters. +func (in *EgressParameters) DeepCopy() *EgressParameters { + if in == nil { + return nil + } + out := new(EgressParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressInitParameters) DeepCopyInto(out *IngressInitParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressInitParameters. +func (in *IngressInitParameters) DeepCopy() *IngressInitParameters { + if in == nil { + return nil + } + out := new(IngressInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressObservation) DeepCopyInto(out *IngressObservation) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressObservation. +func (in *IngressObservation) DeepCopy() *IngressObservation { + if in == nil { + return nil + } + out := new(IngressObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressParameters) DeepCopyInto(out *IngressParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressParameters. +func (in *IngressParameters) DeepCopy() *IngressParameters { + if in == nil { + return nil + } + out := new(IngressParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequesterInitParameters) DeepCopyInto(out *RequesterInitParameters) { + *out = *in + if in.AllowRemoteVPCDNSResolution != nil { + in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterInitParameters. +func (in *RequesterInitParameters) DeepCopy() *RequesterInitParameters { + if in == nil { + return nil + } + out := new(RequesterInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequesterObservation) DeepCopyInto(out *RequesterObservation) { + *out = *in + if in.AllowRemoteVPCDNSResolution != nil { + in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterObservation. +func (in *RequesterObservation) DeepCopy() *RequesterObservation { + if in == nil { + return nil + } + out := new(RequesterObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequesterParameters) DeepCopyInto(out *RequesterParameters) { + *out = *in + if in.AllowRemoteVPCDNSResolution != nil { + in, out := &in.AllowRemoteVPCDNSResolution, &out.AllowRemoteVPCDNSResolution + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterParameters. +func (in *RequesterParameters) DeepCopy() *RequesterParameters { + if in == nil { + return nil + } + out := new(RequesterParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Route) DeepCopyInto(out *Route) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. +func (in *Route) DeepCopy() *Route { + if in == nil { + return nil + } + out := new(Route) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Route) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteInitParameters) DeepCopyInto(out *RouteInitParameters) { + *out = *in + if in.CarrierGatewayID != nil { + in, out := &in.CarrierGatewayID, &out.CarrierGatewayID + *out = new(string) + **out = **in + } + if in.CoreNetworkArn != nil { + in, out := &in.CoreNetworkArn, &out.CoreNetworkArn + *out = new(string) + **out = **in + } + if in.DestinationCidrBlock != nil { + in, out := &in.DestinationCidrBlock, &out.DestinationCidrBlock + *out = new(string) + **out = **in + } + if in.DestinationIPv6CidrBlock != nil { + in, out := &in.DestinationIPv6CidrBlock, &out.DestinationIPv6CidrBlock + *out = new(string) + **out = **in + } + if in.DestinationPrefixListID != nil { + in, out := &in.DestinationPrefixListID, &out.DestinationPrefixListID + *out = new(string) + **out = **in + } + if in.EgressOnlyGatewayID != nil { + in, out := &in.EgressOnlyGatewayID, &out.EgressOnlyGatewayID + *out = new(string) + **out = **in + } + if in.GatewayID != nil { + in, out := &in.GatewayID, &out.GatewayID + *out = new(string) + **out = **in + } + if in.LocalGatewayID != nil { + in, out := &in.LocalGatewayID, &out.LocalGatewayID + *out = new(string) + **out = **in + } + if in.NATGatewayID != nil { + in, out := &in.NATGatewayID, &out.NATGatewayID + *out = new(string) + **out = **in + } + if in.NetworkInterfaceID != nil { + in, out := &in.NetworkInterfaceID, &out.NetworkInterfaceID + *out = new(string) + **out = **in + } + if in.RouteTableID != nil { + in, out := &in.RouteTableID, &out.RouteTableID + *out = new(string) + **out = **in + } + if in.TransitGatewayID != nil { + in, out := &in.TransitGatewayID, &out.TransitGatewayID + *out = new(string) + **out = **in + } + if in.VPCEndpointID != nil { + in, out := &in.VPCEndpointID, &out.VPCEndpointID + *out = new(string) + **out = **in + } + if in.VPCPeeringConnectionID != nil { + in, out := &in.VPCPeeringConnectionID, &out.VPCPeeringConnectionID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteInitParameters. +func (in *RouteInitParameters) DeepCopy() *RouteInitParameters { + if in == nil { + return nil + } + out := new(RouteInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteList) DeepCopyInto(out *RouteList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Route, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList. +func (in *RouteList) DeepCopy() *RouteList { + if in == nil { + return nil + } + out := new(RouteList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouteList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteObservation) DeepCopyInto(out *RouteObservation) { + *out = *in + if in.CarrierGatewayID != nil { + in, out := &in.CarrierGatewayID, &out.CarrierGatewayID + *out = new(string) + **out = **in + } + if in.CoreNetworkArn != nil { + in, out := &in.CoreNetworkArn, &out.CoreNetworkArn + *out = new(string) + **out = **in + } + if in.DestinationCidrBlock != nil { + in, out := &in.DestinationCidrBlock, &out.DestinationCidrBlock + *out = new(string) + **out = **in + } + if in.DestinationIPv6CidrBlock != nil { + in, out := &in.DestinationIPv6CidrBlock, &out.DestinationIPv6CidrBlock + *out = new(string) + **out = **in + } + if in.DestinationPrefixListID != nil { + in, out := &in.DestinationPrefixListID, &out.DestinationPrefixListID + *out = new(string) + **out = **in + } + if in.EgressOnlyGatewayID != nil { + in, out := &in.EgressOnlyGatewayID, &out.EgressOnlyGatewayID + *out = new(string) + **out = **in + } + if in.GatewayID != nil { + in, out := &in.GatewayID, &out.GatewayID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceOwnerID != nil { + in, out := &in.InstanceOwnerID, &out.InstanceOwnerID + *out = new(string) + **out = **in + } + if in.LocalGatewayID != nil { + in, out := &in.LocalGatewayID, &out.LocalGatewayID + *out = new(string) + **out = **in + } + if in.NATGatewayID != nil { + in, out := &in.NATGatewayID, &out.NATGatewayID + *out = new(string) + **out = **in + } + if in.NetworkInterfaceID != nil { + in, out := &in.NetworkInterfaceID, &out.NetworkInterfaceID + *out = new(string) + **out = **in + } + if in.Origin != nil { + in, out := &in.Origin, &out.Origin + *out = new(string) + **out = **in + } + if in.RouteTableID != nil { + in, out := &in.RouteTableID, &out.RouteTableID + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.TransitGatewayID != nil { + in, out := &in.TransitGatewayID, &out.TransitGatewayID + *out = new(string) + **out = **in + } + if in.VPCEndpointID != nil { + in, out := &in.VPCEndpointID, &out.VPCEndpointID + *out = new(string) + **out = **in + } + if in.VPCPeeringConnectionID != nil { + in, out := &in.VPCPeeringConnectionID, &out.VPCPeeringConnectionID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteObservation. +func (in *RouteObservation) DeepCopy() *RouteObservation { + if in == nil { + return nil + } + out := new(RouteObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteParameters) DeepCopyInto(out *RouteParameters) { + *out = *in + if in.CarrierGatewayID != nil { + in, out := &in.CarrierGatewayID, &out.CarrierGatewayID + *out = new(string) + **out = **in + } + if in.CoreNetworkArn != nil { + in, out := &in.CoreNetworkArn, &out.CoreNetworkArn + *out = new(string) + **out = **in + } + if in.DestinationCidrBlock != nil { + in, out := &in.DestinationCidrBlock, &out.DestinationCidrBlock + *out = new(string) + **out = **in + } + if in.DestinationIPv6CidrBlock != nil { + in, out := &in.DestinationIPv6CidrBlock, &out.DestinationIPv6CidrBlock + *out = new(string) + **out = **in + } + if in.DestinationPrefixListID != nil { + in, out := &in.DestinationPrefixListID, &out.DestinationPrefixListID + *out = new(string) + **out = **in + } + if in.EgressOnlyGatewayID != nil { in, out := &in.EgressOnlyGatewayID, &out.EgressOnlyGatewayID *out = new(string) **out = **in } - if in.GatewayID != nil { - in, out := &in.GatewayID, &out.GatewayID + if in.GatewayID != nil { + in, out := &in.GatewayID, &out.GatewayID + *out = new(string) + **out = **in + } + if in.LocalGatewayID != nil { + in, out := &in.LocalGatewayID, &out.LocalGatewayID + *out = new(string) + **out = **in + } + if in.NATGatewayID != nil { + in, out := &in.NATGatewayID, &out.NATGatewayID + *out = new(string) + **out = **in + } + if in.NetworkInterfaceID != nil { + in, out := &in.NetworkInterfaceID, &out.NetworkInterfaceID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RouteTableID != nil { + in, out := &in.RouteTableID, &out.RouteTableID + *out = new(string) + **out = **in + } + if in.TransitGatewayID != nil { + in, out := &in.TransitGatewayID, &out.TransitGatewayID + *out = new(string) + **out = **in + } + if in.VPCEndpointID != nil { + in, out := &in.VPCEndpointID, &out.VPCEndpointID + *out = new(string) + **out = **in + } + if in.VPCPeeringConnectionID != nil { + in, out := &in.VPCPeeringConnectionID, &out.VPCPeeringConnectionID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteParameters. +func (in *RouteParameters) DeepCopy() *RouteParameters { + if in == nil { + return nil + } + out := new(RouteParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteSpec) DeepCopyInto(out *RouteSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec. +func (in *RouteSpec) DeepCopy() *RouteSpec { + if in == nil { + return nil + } + out := new(RouteSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteStatus) DeepCopyInto(out *RouteStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatus. +func (in *RouteStatus) DeepCopy() *RouteStatus { + if in == nil { + return nil + } + out := new(RouteStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup. +func (in *SecurityGroup) DeepCopy() *SecurityGroup { + if in == nil { + return nil + } + out := new(SecurityGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupInitParameters) DeepCopyInto(out *SecurityGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Egress != nil { + in, out := &in.Egress, &out.Egress + *out = make([]EgressInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ingress != nil { + in, out := &in.Ingress, &out.Ingress + *out = make([]IngressInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.RevokeRulesOnDelete != nil { + in, out := &in.RevokeRulesOnDelete, &out.RevokeRulesOnDelete + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupInitParameters. +func (in *SecurityGroupInitParameters) DeepCopy() *SecurityGroupInitParameters { + if in == nil { + return nil + } + out := new(SecurityGroupInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupList) DeepCopyInto(out *SecurityGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SecurityGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupList. +func (in *SecurityGroupList) DeepCopy() *SecurityGroupList { + if in == nil { + return nil + } + out := new(SecurityGroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupObservation) DeepCopyInto(out *SecurityGroupObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Egress != nil { + in, out := &in.Egress, &out.Egress + *out = make([]EgressObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Ingress != nil { + in, out := &in.Ingress, &out.Ingress + *out = make([]IngressObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.OwnerID != nil { + in, out := &in.OwnerID, &out.OwnerID + *out = new(string) + **out = **in + } + if in.RevokeRulesOnDelete != nil { + in, out := &in.RevokeRulesOnDelete, &out.RevokeRulesOnDelete + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupObservation. +func (in *SecurityGroupObservation) DeepCopy() *SecurityGroupObservation { + if in == nil { + return nil + } + out := new(SecurityGroupObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupParameters) DeepCopyInto(out *SecurityGroupParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Egress != nil { + in, out := &in.Egress, &out.Egress + *out = make([]EgressParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ingress != nil { + in, out := &in.Ingress, &out.Ingress + *out = make([]IngressParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RevokeRulesOnDelete != nil { + in, out := &in.RevokeRulesOnDelete, &out.RevokeRulesOnDelete + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupParameters. +func (in *SecurityGroupParameters) DeepCopy() *SecurityGroupParameters { + if in == nil { + return nil + } + out := new(SecurityGroupParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRule) DeepCopyInto(out *SecurityGroupRule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRule. +func (in *SecurityGroupRule) DeepCopy() *SecurityGroupRule { + if in == nil { + return nil + } + out := new(SecurityGroupRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroupRule) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleInitParameters) DeepCopyInto(out *SecurityGroupRuleInitParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.SourceSecurityGroupID != nil { + in, out := &in.SourceSecurityGroupID, &out.SourceSecurityGroupID + *out = new(string) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleInitParameters. +func (in *SecurityGroupRuleInitParameters) DeepCopy() *SecurityGroupRuleInitParameters { + if in == nil { + return nil + } + out := new(SecurityGroupRuleInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleList) DeepCopyInto(out *SecurityGroupRuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SecurityGroupRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleList. +func (in *SecurityGroupRuleList) DeepCopy() *SecurityGroupRuleList { + if in == nil { + return nil + } + out := new(SecurityGroupRuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroupRuleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleObservation) DeepCopyInto(out *SecurityGroupRuleObservation) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.SecurityGroupID != nil { + in, out := &in.SecurityGroupID, &out.SecurityGroupID + *out = new(string) + **out = **in + } + if in.SecurityGroupRuleID != nil { + in, out := &in.SecurityGroupRuleID, &out.SecurityGroupRuleID + *out = new(string) + **out = **in + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.SourceSecurityGroupID != nil { + in, out := &in.SourceSecurityGroupID, &out.SourceSecurityGroupID + *out = new(string) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleObservation. +func (in *SecurityGroupRuleObservation) DeepCopy() *SecurityGroupRuleObservation { + if in == nil { + return nil + } + out := new(SecurityGroupRuleObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleParameters) DeepCopyInto(out *SecurityGroupRuleParameters) { + *out = *in + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.FromPort != nil { + in, out := &in.FromPort, &out.FromPort + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlocks != nil { + in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PrefixListIds != nil { + in, out := &in.PrefixListIds, &out.PrefixListIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SecurityGroupID != nil { + in, out := &in.SecurityGroupID, &out.SecurityGroupID + *out = new(string) + **out = **in + } + if in.SecurityGroupIDRef != nil { + in, out := &in.SecurityGroupIDRef, &out.SecurityGroupIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Self != nil { + in, out := &in.Self, &out.Self + *out = new(bool) + **out = **in + } + if in.SourceSecurityGroupID != nil { + in, out := &in.SourceSecurityGroupID, &out.SourceSecurityGroupID + *out = new(string) + **out = **in + } + if in.ToPort != nil { + in, out := &in.ToPort, &out.ToPort + *out = new(float64) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleParameters. +func (in *SecurityGroupRuleParameters) DeepCopy() *SecurityGroupRuleParameters { + if in == nil { + return nil + } + out := new(SecurityGroupRuleParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleSpec) DeepCopyInto(out *SecurityGroupRuleSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleSpec. +func (in *SecurityGroupRuleSpec) DeepCopy() *SecurityGroupRuleSpec { + if in == nil { + return nil + } + out := new(SecurityGroupRuleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleStatus) DeepCopyInto(out *SecurityGroupRuleStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleStatus. +func (in *SecurityGroupRuleStatus) DeepCopy() *SecurityGroupRuleStatus { + if in == nil { + return nil + } + out := new(SecurityGroupRuleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupSpec) DeepCopyInto(out *SecurityGroupSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupSpec. +func (in *SecurityGroupSpec) DeepCopy() *SecurityGroupSpec { + if in == nil { + return nil + } + out := new(SecurityGroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupStatus) DeepCopyInto(out *SecurityGroupStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupStatus. +func (in *SecurityGroupStatus) DeepCopy() *SecurityGroupStatus { + if in == nil { + return nil + } + out := new(SecurityGroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Subnet) DeepCopyInto(out *Subnet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet. +func (in *Subnet) DeepCopy() *Subnet { + if in == nil { + return nil + } + out := new(Subnet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Subnet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetInitParameters) DeepCopyInto(out *SubnetInitParameters) { + *out = *in + if in.AssignIPv6AddressOnCreation != nil { + in, out := &in.AssignIPv6AddressOnCreation, &out.AssignIPv6AddressOnCreation + *out = new(bool) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.AvailabilityZoneID != nil { + in, out := &in.AvailabilityZoneID, &out.AvailabilityZoneID + *out = new(string) + **out = **in + } + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock + *out = new(string) + **out = **in + } + if in.CustomerOwnedIPv4Pool != nil { + in, out := &in.CustomerOwnedIPv4Pool, &out.CustomerOwnedIPv4Pool + *out = new(string) + **out = **in + } + if in.EnableDns64 != nil { + in, out := &in.EnableDns64, &out.EnableDns64 + *out = new(bool) + **out = **in + } + if in.EnableLniAtDeviceIndex != nil { + in, out := &in.EnableLniAtDeviceIndex, &out.EnableLniAtDeviceIndex + *out = new(float64) + **out = **in + } + if in.EnableResourceNameDNSARecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSARecordOnLaunch, &out.EnableResourceNameDNSARecordOnLaunch + *out = new(bool) + **out = **in + } + if in.EnableResourceNameDNSAaaaRecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSAaaaRecordOnLaunch, &out.EnableResourceNameDNSAaaaRecordOnLaunch + *out = new(bool) + **out = **in + } + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock + *out = new(string) + **out = **in + } + if in.IPv6Native != nil { + in, out := &in.IPv6Native, &out.IPv6Native + *out = new(bool) + **out = **in + } + if in.MapCustomerOwnedIPOnLaunch != nil { + in, out := &in.MapCustomerOwnedIPOnLaunch, &out.MapCustomerOwnedIPOnLaunch + *out = new(bool) + **out = **in + } + if in.MapPublicIPOnLaunch != nil { + in, out := &in.MapPublicIPOnLaunch, &out.MapPublicIPOnLaunch + *out = new(bool) + **out = **in + } + if in.OutpostArn != nil { + in, out := &in.OutpostArn, &out.OutpostArn + *out = new(string) + **out = **in + } + if in.PrivateDNSHostnameTypeOnLaunch != nil { + in, out := &in.PrivateDNSHostnameTypeOnLaunch, &out.PrivateDNSHostnameTypeOnLaunch + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetInitParameters. +func (in *SubnetInitParameters) DeepCopy() *SubnetInitParameters { + if in == nil { + return nil + } + out := new(SubnetInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetList) DeepCopyInto(out *SubnetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Subnet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetList. +func (in *SubnetList) DeepCopy() *SubnetList { + if in == nil { + return nil + } + out := new(SubnetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubnetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetObservation) DeepCopyInto(out *SubnetObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.AssignIPv6AddressOnCreation != nil { + in, out := &in.AssignIPv6AddressOnCreation, &out.AssignIPv6AddressOnCreation + *out = new(bool) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.AvailabilityZoneID != nil { + in, out := &in.AvailabilityZoneID, &out.AvailabilityZoneID + *out = new(string) + **out = **in + } + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock + *out = new(string) + **out = **in + } + if in.CustomerOwnedIPv4Pool != nil { + in, out := &in.CustomerOwnedIPv4Pool, &out.CustomerOwnedIPv4Pool + *out = new(string) + **out = **in + } + if in.EnableDns64 != nil { + in, out := &in.EnableDns64, &out.EnableDns64 + *out = new(bool) + **out = **in + } + if in.EnableLniAtDeviceIndex != nil { + in, out := &in.EnableLniAtDeviceIndex, &out.EnableLniAtDeviceIndex + *out = new(float64) + **out = **in + } + if in.EnableResourceNameDNSARecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSARecordOnLaunch, &out.EnableResourceNameDNSARecordOnLaunch + *out = new(bool) + **out = **in + } + if in.EnableResourceNameDNSAaaaRecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSAaaaRecordOnLaunch, &out.EnableResourceNameDNSAaaaRecordOnLaunch + *out = new(bool) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock + *out = new(string) + **out = **in + } + if in.IPv6CidrBlockAssociationID != nil { + in, out := &in.IPv6CidrBlockAssociationID, &out.IPv6CidrBlockAssociationID + *out = new(string) + **out = **in + } + if in.IPv6Native != nil { + in, out := &in.IPv6Native, &out.IPv6Native + *out = new(bool) + **out = **in + } + if in.MapCustomerOwnedIPOnLaunch != nil { + in, out := &in.MapCustomerOwnedIPOnLaunch, &out.MapCustomerOwnedIPOnLaunch + *out = new(bool) + **out = **in + } + if in.MapPublicIPOnLaunch != nil { + in, out := &in.MapPublicIPOnLaunch, &out.MapPublicIPOnLaunch + *out = new(bool) + **out = **in + } + if in.OutpostArn != nil { + in, out := &in.OutpostArn, &out.OutpostArn + *out = new(string) + **out = **in + } + if in.OwnerID != nil { + in, out := &in.OwnerID, &out.OwnerID + *out = new(string) + **out = **in + } + if in.PrivateDNSHostnameTypeOnLaunch != nil { + in, out := &in.PrivateDNSHostnameTypeOnLaunch, &out.PrivateDNSHostnameTypeOnLaunch + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetObservation. +func (in *SubnetObservation) DeepCopy() *SubnetObservation { + if in == nil { + return nil + } + out := new(SubnetObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetParameters) DeepCopyInto(out *SubnetParameters) { + *out = *in + if in.AssignIPv6AddressOnCreation != nil { + in, out := &in.AssignIPv6AddressOnCreation, &out.AssignIPv6AddressOnCreation + *out = new(bool) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.AvailabilityZoneID != nil { + in, out := &in.AvailabilityZoneID, &out.AvailabilityZoneID + *out = new(string) + **out = **in + } + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock + *out = new(string) + **out = **in + } + if in.CustomerOwnedIPv4Pool != nil { + in, out := &in.CustomerOwnedIPv4Pool, &out.CustomerOwnedIPv4Pool + *out = new(string) + **out = **in + } + if in.EnableDns64 != nil { + in, out := &in.EnableDns64, &out.EnableDns64 + *out = new(bool) + **out = **in + } + if in.EnableLniAtDeviceIndex != nil { + in, out := &in.EnableLniAtDeviceIndex, &out.EnableLniAtDeviceIndex + *out = new(float64) + **out = **in + } + if in.EnableResourceNameDNSARecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSARecordOnLaunch, &out.EnableResourceNameDNSARecordOnLaunch + *out = new(bool) + **out = **in + } + if in.EnableResourceNameDNSAaaaRecordOnLaunch != nil { + in, out := &in.EnableResourceNameDNSAaaaRecordOnLaunch, &out.EnableResourceNameDNSAaaaRecordOnLaunch + *out = new(bool) + **out = **in + } + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock + *out = new(string) + **out = **in + } + if in.IPv6Native != nil { + in, out := &in.IPv6Native, &out.IPv6Native + *out = new(bool) + **out = **in + } + if in.MapCustomerOwnedIPOnLaunch != nil { + in, out := &in.MapCustomerOwnedIPOnLaunch, &out.MapCustomerOwnedIPOnLaunch + *out = new(bool) + **out = **in + } + if in.MapPublicIPOnLaunch != nil { + in, out := &in.MapPublicIPOnLaunch, &out.MapPublicIPOnLaunch + *out = new(bool) + **out = **in + } + if in.OutpostArn != nil { + in, out := &in.OutpostArn, &out.OutpostArn + *out = new(string) + **out = **in + } + if in.PrivateDNSHostnameTypeOnLaunch != nil { + in, out := &in.PrivateDNSHostnameTypeOnLaunch, &out.PrivateDNSHostnameTypeOnLaunch + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetParameters. +func (in *SubnetParameters) DeepCopy() *SubnetParameters { + if in == nil { + return nil + } + out := new(SubnetParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec. +func (in *SubnetSpec) DeepCopy() *SubnetSpec { + if in == nil { + return nil + } + out := new(SubnetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetStatus. +func (in *SubnetStatus) DeepCopy() *SubnetStatus { + if in == nil { + return nil + } + out := new(SubnetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPC) DeepCopyInto(out *VPC) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPC. +func (in *VPC) DeepCopy() *VPC { + if in == nil { + return nil + } + out := new(VPC) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VPC) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCEndpoint) DeepCopyInto(out *VPCEndpoint) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpoint. +func (in *VPCEndpoint) DeepCopy() *VPCEndpoint { + if in == nil { + return nil + } + out := new(VPCEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VPCEndpoint) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCEndpointInitParameters) DeepCopyInto(out *VPCEndpointInitParameters) { + *out = *in + if in.AutoAccept != nil { + in, out := &in.AutoAccept, &out.AutoAccept + *out = new(bool) + **out = **in + } + if in.DNSOptions != nil { + in, out := &in.DNSOptions, &out.DNSOptions + *out = make([]DNSOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.IPAddressType != nil { + in, out := &in.IPAddressType, &out.IPAddressType + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.PrivateDNSEnabled != nil { + in, out := &in.PrivateDNSEnabled, &out.PrivateDNSEnabled + *out = new(bool) + **out = **in + } + if in.RouteTableIds != nil { + in, out := &in.RouteTableIds, &out.RouteTableIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCEndpointType != nil { + in, out := &in.VPCEndpointType, &out.VPCEndpointType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointInitParameters. +func (in *VPCEndpointInitParameters) DeepCopy() *VPCEndpointInitParameters { + if in == nil { + return nil + } + out := new(VPCEndpointInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCEndpointList) DeepCopyInto(out *VPCEndpointList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VPCEndpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointList. +func (in *VPCEndpointList) DeepCopy() *VPCEndpointList { + if in == nil { + return nil + } + out := new(VPCEndpointList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VPCEndpointList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCEndpointObservation) DeepCopyInto(out *VPCEndpointObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.AutoAccept != nil { + in, out := &in.AutoAccept, &out.AutoAccept + *out = new(bool) + **out = **in + } + if in.CidrBlocks != nil { + in, out := &in.CidrBlocks, &out.CidrBlocks + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.DNSEntry != nil { + in, out := &in.DNSEntry, &out.DNSEntry + *out = make([]DNSEntryObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DNSOptions != nil { + in, out := &in.DNSOptions, &out.DNSOptions + *out = make([]DNSOptionsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPAddressType != nil { + in, out := &in.IPAddressType, &out.IPAddressType + *out = new(string) + **out = **in + } + if in.NetworkInterfaceIds != nil { + in, out := &in.NetworkInterfaceIds, &out.NetworkInterfaceIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.OwnerID != nil { + in, out := &in.OwnerID, &out.OwnerID + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.PrefixListID != nil { + in, out := &in.PrefixListID, &out.PrefixListID + *out = new(string) + **out = **in + } + if in.PrivateDNSEnabled != nil { + in, out := &in.PrivateDNSEnabled, &out.PrivateDNSEnabled + *out = new(bool) + **out = **in + } + if in.RequesterManaged != nil { + in, out := &in.RequesterManaged, &out.RequesterManaged + *out = new(bool) + **out = **in + } + if in.RouteTableIds != nil { + in, out := &in.RouteTableIds, &out.RouteTableIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SecurityGroupIds != nil { + in, out := &in.SecurityGroupIds, &out.SecurityGroupIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.SubnetIds != nil { + in, out := &in.SubnetIds, &out.SubnetIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCEndpointType != nil { + in, out := &in.VPCEndpointType, &out.VPCEndpointType + *out = new(string) + **out = **in + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointObservation. +func (in *VPCEndpointObservation) DeepCopy() *VPCEndpointObservation { + if in == nil { + return nil + } + out := new(VPCEndpointObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCEndpointParameters) DeepCopyInto(out *VPCEndpointParameters) { + *out = *in + if in.AutoAccept != nil { + in, out := &in.AutoAccept, &out.AutoAccept + *out = new(bool) + **out = **in + } + if in.DNSOptions != nil { + in, out := &in.DNSOptions, &out.DNSOptions + *out = make([]DNSOptionsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.IPAddressType != nil { + in, out := &in.IPAddressType, &out.IPAddressType + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.PrivateDNSEnabled != nil { + in, out := &in.PrivateDNSEnabled, &out.PrivateDNSEnabled + *out = new(bool) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RouteTableIds != nil { + in, out := &in.RouteTableIds, &out.RouteTableIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.SecurityGroupIds != nil { + in, out := &in.SecurityGroupIds, &out.SecurityGroupIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName *out = new(string) **out = **in } - if in.LocalGatewayID != nil { - in, out := &in.LocalGatewayID, &out.LocalGatewayID - *out = new(string) - **out = **in + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - if in.NATGatewayID != nil { - in, out := &in.NATGatewayID, &out.NATGatewayID - *out = new(string) - **out = **in + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) } - if in.NetworkInterfaceID != nil { - in, out := &in.NetworkInterfaceID, &out.NetworkInterfaceID - *out = new(string) - **out = **in + if in.SubnetIds != nil { + in, out := &in.SubnetIds, &out.SubnetIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.Region != nil { - in, out := &in.Region, &out.Region - *out = new(string) - **out = **in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - if in.RouteTableID != nil { - in, out := &in.RouteTableID, &out.RouteTableID - *out = new(string) - **out = **in + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - if in.TransitGatewayID != nil { - in, out := &in.TransitGatewayID, &out.TransitGatewayID + if in.VPCEndpointType != nil { + in, out := &in.VPCEndpointType, &out.VPCEndpointType *out = new(string) **out = **in } - if in.VPCEndpointID != nil { - in, out := &in.VPCEndpointID, &out.VPCEndpointID + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID *out = new(string) **out = **in } - if in.VPCPeeringConnectionID != nil { - in, out := &in.VPCPeeringConnectionID, &out.VPCPeeringConnectionID - *out = new(string) - **out = **in + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteParameters. -func (in *RouteParameters) DeepCopy() *RouteParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointParameters. +func (in *VPCEndpointParameters) DeepCopy() *VPCEndpointParameters { if in == nil { return nil } - out := new(RouteParameters) + out := new(VPCEndpointParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteSpec) DeepCopyInto(out *RouteSpec) { +func (in *VPCEndpointSpec) DeepCopyInto(out *VPCEndpointSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec. -func (in *RouteSpec) DeepCopy() *RouteSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointSpec. +func (in *VPCEndpointSpec) DeepCopy() *VPCEndpointSpec { if in == nil { return nil } - out := new(RouteSpec) + out := new(VPCEndpointSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteStatus) DeepCopyInto(out *RouteStatus) { +func (in *VPCEndpointStatus) DeepCopyInto(out *VPCEndpointStatus) { *out = *in in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatus. -func (in *RouteStatus) DeepCopy() *RouteStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCEndpointStatus. +func (in *VPCEndpointStatus) DeepCopy() *VPCEndpointStatus { if in == nil { return nil } - out := new(RouteStatus) + out := new(VPCEndpointStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRule) DeepCopyInto(out *SecurityGroupRule) { +func (in *VPCInitParameters) DeepCopyInto(out *VPCInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + if in.AssignGeneratedIPv6CidrBlock != nil { + in, out := &in.AssignGeneratedIPv6CidrBlock, &out.AssignGeneratedIPv6CidrBlock + *out = new(bool) + **out = **in + } + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock + *out = new(string) + **out = **in + } + if in.EnableDNSHostnames != nil { + in, out := &in.EnableDNSHostnames, &out.EnableDNSHostnames + *out = new(bool) + **out = **in + } + if in.EnableDNSSupport != nil { + in, out := &in.EnableDNSSupport, &out.EnableDNSSupport + *out = new(bool) + **out = **in + } + if in.EnableNetworkAddressUsageMetrics != nil { + in, out := &in.EnableNetworkAddressUsageMetrics, &out.EnableNetworkAddressUsageMetrics + *out = new(bool) + **out = **in + } + if in.IPv4IpamPoolID != nil { + in, out := &in.IPv4IpamPoolID, &out.IPv4IpamPoolID + *out = new(string) + **out = **in + } + if in.IPv4NetmaskLength != nil { + in, out := &in.IPv4NetmaskLength, &out.IPv4NetmaskLength + *out = new(float64) + **out = **in + } + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock + *out = new(string) + **out = **in + } + if in.IPv6CidrBlockNetworkBorderGroup != nil { + in, out := &in.IPv6CidrBlockNetworkBorderGroup, &out.IPv6CidrBlockNetworkBorderGroup + *out = new(string) + **out = **in + } + if in.IPv6IpamPoolID != nil { + in, out := &in.IPv6IpamPoolID, &out.IPv6IpamPoolID + *out = new(string) + **out = **in + } + if in.IPv6NetmaskLength != nil { + in, out := &in.IPv6NetmaskLength, &out.IPv6NetmaskLength + *out = new(float64) + **out = **in + } + if in.InstanceTenancy != nil { + in, out := &in.InstanceTenancy, &out.InstanceTenancy + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRule. -func (in *SecurityGroupRule) DeepCopy() *SecurityGroupRule { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCInitParameters. +func (in *VPCInitParameters) DeepCopy() *VPCInitParameters { if in == nil { return nil } - out := new(SecurityGroupRule) + out := new(VPCInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecurityGroupRule) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRuleList) DeepCopyInto(out *SecurityGroupRuleList) { +func (in *VPCList) DeepCopyInto(out *VPCList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]SecurityGroupRule, len(*in)) + *out = make([]VPC, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleList. -func (in *SecurityGroupRuleList) DeepCopy() *SecurityGroupRuleList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCList. +func (in *VPCList) DeepCopy() *VPCList { if in == nil { return nil } - out := new(SecurityGroupRuleList) + out := new(VPCList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecurityGroupRuleList) DeepCopyObject() runtime.Object { +func (in *VPCList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -446,27 +3089,56 @@ func (in *SecurityGroupRuleList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRuleObservation) DeepCopyInto(out *SecurityGroupRuleObservation) { +func (in *VPCObservation) DeepCopyInto(out *VPCObservation) { *out = *in - if in.CidrBlocks != nil { - in, out := &in.CidrBlocks, &out.CidrBlocks - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in } - if in.Description != nil { - in, out := &in.Description, &out.Description + if in.AssignGeneratedIPv6CidrBlock != nil { + in, out := &in.AssignGeneratedIPv6CidrBlock, &out.AssignGeneratedIPv6CidrBlock + *out = new(bool) + **out = **in + } + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock *out = new(string) **out = **in } - if in.FromPort != nil { - in, out := &in.FromPort, &out.FromPort - *out = new(float64) + if in.DHCPOptionsID != nil { + in, out := &in.DHCPOptionsID, &out.DHCPOptionsID + *out = new(string) + **out = **in + } + if in.DefaultNetworkACLID != nil { + in, out := &in.DefaultNetworkACLID, &out.DefaultNetworkACLID + *out = new(string) + **out = **in + } + if in.DefaultRouteTableID != nil { + in, out := &in.DefaultRouteTableID, &out.DefaultRouteTableID + *out = new(string) + **out = **in + } + if in.DefaultSecurityGroupID != nil { + in, out := &in.DefaultSecurityGroupID, &out.DefaultSecurityGroupID + *out = new(string) + **out = **in + } + if in.EnableDNSHostnames != nil { + in, out := &in.EnableDNSHostnames, &out.EnableDNSHostnames + *out = new(bool) + **out = **in + } + if in.EnableDNSSupport != nil { + in, out := &in.EnableDNSSupport, &out.EnableDNSSupport + *out = new(bool) + **out = **in + } + if in.EnableNetworkAddressUsageMetrics != nil { + in, out := &in.EnableNetworkAddressUsageMetrics, &out.EnableNetworkAddressUsageMetrics + *out = new(bool) **out = **in } if in.ID != nil { @@ -474,198 +3146,208 @@ func (in *SecurityGroupRuleObservation) DeepCopyInto(out *SecurityGroupRuleObser *out = new(string) **out = **in } - if in.IPv6CidrBlocks != nil { - in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.IPv4IpamPoolID != nil { + in, out := &in.IPv4IpamPoolID, &out.IPv4IpamPoolID + *out = new(string) + **out = **in } - if in.PrefixListIds != nil { - in, out := &in.PrefixListIds, &out.PrefixListIds - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.IPv4NetmaskLength != nil { + in, out := &in.IPv4NetmaskLength, &out.IPv4NetmaskLength + *out = new(float64) + **out = **in } - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol + if in.IPv6AssociationID != nil { + in, out := &in.IPv6AssociationID, &out.IPv6AssociationID *out = new(string) **out = **in } - if in.SecurityGroupID != nil { - in, out := &in.SecurityGroupID, &out.SecurityGroupID + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock *out = new(string) **out = **in } - if in.SecurityGroupRuleID != nil { - in, out := &in.SecurityGroupRuleID, &out.SecurityGroupRuleID + if in.IPv6CidrBlockNetworkBorderGroup != nil { + in, out := &in.IPv6CidrBlockNetworkBorderGroup, &out.IPv6CidrBlockNetworkBorderGroup *out = new(string) **out = **in } - if in.Self != nil { - in, out := &in.Self, &out.Self - *out = new(bool) + if in.IPv6IpamPoolID != nil { + in, out := &in.IPv6IpamPoolID, &out.IPv6IpamPoolID + *out = new(string) **out = **in } - if in.SourceSecurityGroupID != nil { - in, out := &in.SourceSecurityGroupID, &out.SourceSecurityGroupID + if in.IPv6NetmaskLength != nil { + in, out := &in.IPv6NetmaskLength, &out.IPv6NetmaskLength + *out = new(float64) + **out = **in + } + if in.InstanceTenancy != nil { + in, out := &in.InstanceTenancy, &out.InstanceTenancy *out = new(string) **out = **in } - if in.ToPort != nil { - in, out := &in.ToPort, &out.ToPort - *out = new(float64) + if in.MainRouteTableID != nil { + in, out := &in.MainRouteTableID, &out.MainRouteTableID + *out = new(string) **out = **in } - if in.Type != nil { - in, out := &in.Type, &out.Type + if in.OwnerID != nil { + in, out := &in.OwnerID, &out.OwnerID *out = new(string) **out = **in } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleObservation. -func (in *SecurityGroupRuleObservation) DeepCopy() *SecurityGroupRuleObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCObservation. +func (in *VPCObservation) DeepCopy() *VPCObservation { if in == nil { return nil } - out := new(SecurityGroupRuleObservation) + out := new(VPCObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRuleParameters) DeepCopyInto(out *SecurityGroupRuleParameters) { +func (in *VPCParameters) DeepCopyInto(out *VPCParameters) { *out = *in - if in.CidrBlocks != nil { - in, out := &in.CidrBlocks, &out.CidrBlocks - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.AssignGeneratedIPv6CidrBlock != nil { + in, out := &in.AssignGeneratedIPv6CidrBlock, &out.AssignGeneratedIPv6CidrBlock + *out = new(bool) + **out = **in } - if in.Description != nil { - in, out := &in.Description, &out.Description + if in.CidrBlock != nil { + in, out := &in.CidrBlock, &out.CidrBlock *out = new(string) **out = **in } - if in.FromPort != nil { - in, out := &in.FromPort, &out.FromPort - *out = new(float64) + if in.EnableDNSHostnames != nil { + in, out := &in.EnableDNSHostnames, &out.EnableDNSHostnames + *out = new(bool) **out = **in } - if in.IPv6CidrBlocks != nil { - in, out := &in.IPv6CidrBlocks, &out.IPv6CidrBlocks - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.EnableDNSSupport != nil { + in, out := &in.EnableDNSSupport, &out.EnableDNSSupport + *out = new(bool) + **out = **in } - if in.PrefixListIds != nil { - in, out := &in.PrefixListIds, &out.PrefixListIds - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.EnableNetworkAddressUsageMetrics != nil { + in, out := &in.EnableNetworkAddressUsageMetrics, &out.EnableNetworkAddressUsageMetrics + *out = new(bool) + **out = **in } - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol + if in.IPv4IpamPoolID != nil { + in, out := &in.IPv4IpamPoolID, &out.IPv4IpamPoolID *out = new(string) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region - *out = new(string) + if in.IPv4NetmaskLength != nil { + in, out := &in.IPv4NetmaskLength, &out.IPv4NetmaskLength + *out = new(float64) **out = **in } - if in.SecurityGroupID != nil { - in, out := &in.SecurityGroupID, &out.SecurityGroupID + if in.IPv6CidrBlock != nil { + in, out := &in.IPv6CidrBlock, &out.IPv6CidrBlock *out = new(string) **out = **in } - if in.Self != nil { - in, out := &in.Self, &out.Self - *out = new(bool) + if in.IPv6CidrBlockNetworkBorderGroup != nil { + in, out := &in.IPv6CidrBlockNetworkBorderGroup, &out.IPv6CidrBlockNetworkBorderGroup + *out = new(string) **out = **in } - if in.SourceSecurityGroupID != nil { - in, out := &in.SourceSecurityGroupID, &out.SourceSecurityGroupID + if in.IPv6IpamPoolID != nil { + in, out := &in.IPv6IpamPoolID, &out.IPv6IpamPoolID *out = new(string) **out = **in } - if in.ToPort != nil { - in, out := &in.ToPort, &out.ToPort + if in.IPv6NetmaskLength != nil { + in, out := &in.IPv6NetmaskLength, &out.IPv6NetmaskLength *out = new(float64) **out = **in } - if in.Type != nil { - in, out := &in.Type, &out.Type + if in.InstanceTenancy != nil { + in, out := &in.InstanceTenancy, &out.InstanceTenancy *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleParameters. -func (in *SecurityGroupRuleParameters) DeepCopy() *SecurityGroupRuleParameters { - if in == nil { - return nil + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in } - out := new(SecurityGroupRuleParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRuleSpec) DeepCopyInto(out *SecurityGroupRuleSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleSpec. -func (in *SecurityGroupRuleSpec) DeepCopy() *SecurityGroupRuleSpec { - if in == nil { - return nil + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - out := new(SecurityGroupRuleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupRuleStatus) DeepCopyInto(out *SecurityGroupRuleStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleStatus. -func (in *SecurityGroupRuleStatus) DeepCopy() *SecurityGroupRuleStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCParameters. +func (in *VPCParameters) DeepCopy() *VPCParameters { if in == nil { return nil } - out := new(SecurityGroupRuleStatus) + out := new(VPCParameters) in.DeepCopyInto(out) return out } @@ -697,6 +3379,82 @@ func (in *VPCPeeringConnection) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCPeeringConnectionInitParameters) DeepCopyInto(out *VPCPeeringConnectionInitParameters) { + *out = *in + if in.Accepter != nil { + in, out := &in.Accepter, &out.Accepter + *out = make([]AccepterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AutoAccept != nil { + in, out := &in.AutoAccept, &out.AutoAccept + *out = new(bool) + **out = **in + } + if in.PeerOwnerID != nil { + in, out := &in.PeerOwnerID, &out.PeerOwnerID + *out = new(string) + **out = **in + } + if in.PeerRegion != nil { + in, out := &in.PeerRegion, &out.PeerRegion + *out = new(string) + **out = **in + } + if in.Requester != nil { + in, out := &in.Requester, &out.Requester + *out = make([]RequesterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringConnectionInitParameters. +func (in *VPCPeeringConnectionInitParameters) DeepCopy() *VPCPeeringConnectionInitParameters { + if in == nil { + return nil + } + out := new(VPCPeeringConnectionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCPeeringConnectionList) DeepCopyInto(out *VPCPeeringConnectionList) { *out = *in @@ -784,7 +3542,8 @@ func (in *VPCPeeringConnectionObservation) DeepCopyInto(out *VPCPeeringConnectio if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -799,7 +3558,8 @@ func (in *VPCPeeringConnectionObservation) DeepCopyInto(out *VPCPeeringConnectio if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -853,6 +3613,16 @@ func (in *VPCPeeringConnectionParameters) DeepCopyInto(out *VPCPeeringConnection *out = new(string) **out = **in } + if in.PeerVPCIDRef != nil { + in, out := &in.PeerVPCIDRef, &out.PeerVPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.PeerVPCIDSelector != nil { + in, out := &in.PeerVPCIDSelector, &out.PeerVPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -873,7 +3643,8 @@ func (in *VPCPeeringConnectionParameters) DeepCopyInto(out *VPCPeeringConnection if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -888,7 +3659,8 @@ func (in *VPCPeeringConnectionParameters) DeepCopyInto(out *VPCPeeringConnection if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -900,6 +3672,16 @@ func (in *VPCPeeringConnectionParameters) DeepCopyInto(out *VPCPeeringConnection *out = new(string) **out = **in } + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringConnectionParameters. @@ -917,6 +3699,7 @@ func (in *VPCPeeringConnectionSpec) DeepCopyInto(out *VPCPeeringConnectionSpec) *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringConnectionSpec. @@ -945,3 +3728,38 @@ func (in *VPCPeeringConnectionStatus) DeepCopy() *VPCPeeringConnectionStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCSpec) DeepCopyInto(out *VPCSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCSpec. +func (in *VPCSpec) DeepCopy() *VPCSpec { + if in == nil { + return nil + } + out := new(VPCSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCStatus) DeepCopyInto(out *VPCStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCStatus. +func (in *VPCStatus) DeepCopy() *VPCStatus { + if in == nil { + return nil + } + out := new(VPCStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/ec2/v1alpha1/zz_generated.managed.go b/apis/ec2/v1alpha1/zz_generated.managed.go index 7428679..f82ed4c 100644 --- a/apis/ec2/v1alpha1/zz_generated.managed.go +++ b/apis/ec2/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Route) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Route. -func (mg *Route) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Route. +func (mg *Route) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Route. @@ -27,14 +27,6 @@ func (mg *Route) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Route. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Route) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Route. func (mg *Route) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Route) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Route. -func (mg *Route) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Route. +func (mg *Route) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Route. @@ -65,14 +57,6 @@ func (mg *Route) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Route. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Route) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Route. func (mg *Route) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -83,6 +67,66 @@ func (mg *Route) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this SecurityGroup. +func (mg *SecurityGroup) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this SecurityGroup. +func (mg *SecurityGroup) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this SecurityGroup. +func (mg *SecurityGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this SecurityGroup. +func (mg *SecurityGroup) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this SecurityGroup. +func (mg *SecurityGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this SecurityGroup. +func (mg *SecurityGroup) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this SecurityGroup. +func (mg *SecurityGroup) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this SecurityGroup. +func (mg *SecurityGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this SecurityGroup. +func (mg *SecurityGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this SecurityGroup. +func (mg *SecurityGroup) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this SecurityGroup. +func (mg *SecurityGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this SecurityGroup. +func (mg *SecurityGroup) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this SecurityGroupRule. func (mg *SecurityGroupRule) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) @@ -93,9 +137,9 @@ func (mg *SecurityGroupRule) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this SecurityGroupRule. -func (mg *SecurityGroupRule) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this SecurityGroupRule. +func (mg *SecurityGroupRule) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this SecurityGroupRule. @@ -103,14 +147,6 @@ func (mg *SecurityGroupRule) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this SecurityGroupRule. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *SecurityGroupRule) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this SecurityGroupRule. func (mg *SecurityGroupRule) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +167,9 @@ func (mg *SecurityGroupRule) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this SecurityGroupRule. -func (mg *SecurityGroupRule) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this SecurityGroupRule. +func (mg *SecurityGroupRule) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this SecurityGroupRule. @@ -141,14 +177,6 @@ func (mg *SecurityGroupRule) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this SecurityGroupRule. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *SecurityGroupRule) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this SecurityGroupRule. func (mg *SecurityGroupRule) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -159,6 +187,186 @@ func (mg *SecurityGroupRule) SetWriteConnectionSecretToReference(r *xpv1.SecretR mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this Subnet. +func (mg *Subnet) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Subnet. +func (mg *Subnet) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Subnet. +func (mg *Subnet) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Subnet. +func (mg *Subnet) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Subnet. +func (mg *Subnet) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Subnet. +func (mg *Subnet) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Subnet. +func (mg *Subnet) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Subnet. +func (mg *Subnet) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Subnet. +func (mg *Subnet) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Subnet. +func (mg *Subnet) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Subnet. +func (mg *Subnet) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Subnet. +func (mg *Subnet) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VPC. +func (mg *VPC) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VPC. +func (mg *VPC) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VPC. +func (mg *VPC) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VPC. +func (mg *VPC) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VPC. +func (mg *VPC) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VPC. +func (mg *VPC) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VPC. +func (mg *VPC) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VPC. +func (mg *VPC) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VPC. +func (mg *VPC) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VPC. +func (mg *VPC) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VPC. +func (mg *VPC) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VPC. +func (mg *VPC) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VPCEndpoint. +func (mg *VPCEndpoint) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VPCEndpoint. +func (mg *VPCEndpoint) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VPCEndpoint. +func (mg *VPCEndpoint) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VPCEndpoint. +func (mg *VPCEndpoint) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VPCEndpoint. +func (mg *VPCEndpoint) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VPCEndpoint. +func (mg *VPCEndpoint) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VPCEndpoint. +func (mg *VPCEndpoint) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VPCEndpoint. +func (mg *VPCEndpoint) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VPCEndpoint. +func (mg *VPCEndpoint) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VPCEndpoint. +func (mg *VPCEndpoint) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VPCEndpoint. +func (mg *VPCEndpoint) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VPCEndpoint. +func (mg *VPCEndpoint) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this VPCPeeringConnection. func (mg *VPCPeeringConnection) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) @@ -169,9 +377,9 @@ func (mg *VPCPeeringConnection) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this VPCPeeringConnection. -func (mg *VPCPeeringConnection) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this VPCPeeringConnection. +func (mg *VPCPeeringConnection) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this VPCPeeringConnection. @@ -179,14 +387,6 @@ func (mg *VPCPeeringConnection) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this VPCPeeringConnection. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *VPCPeeringConnection) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this VPCPeeringConnection. func (mg *VPCPeeringConnection) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +407,9 @@ func (mg *VPCPeeringConnection) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this VPCPeeringConnection. -func (mg *VPCPeeringConnection) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this VPCPeeringConnection. +func (mg *VPCPeeringConnection) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this VPCPeeringConnection. @@ -217,14 +417,6 @@ func (mg *VPCPeeringConnection) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this VPCPeeringConnection. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *VPCPeeringConnection) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this VPCPeeringConnection. func (mg *VPCPeeringConnection) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/ec2/v1alpha1/zz_generated.managedlist.go b/apis/ec2/v1alpha1/zz_generated.managedlist.go index 4d5397f..2967d06 100644 --- a/apis/ec2/v1alpha1/zz_generated.managedlist.go +++ b/apis/ec2/v1alpha1/zz_generated.managedlist.go @@ -16,6 +16,15 @@ func (l *RouteList) GetItems() []resource.Managed { return items } +// GetItems of this SecurityGroupList. +func (l *SecurityGroupList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + // GetItems of this SecurityGroupRuleList. func (l *SecurityGroupRuleList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) @@ -25,6 +34,33 @@ func (l *SecurityGroupRuleList) GetItems() []resource.Managed { return items } +// GetItems of this SubnetList. +func (l *SubnetList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VPCEndpointList. +func (l *VPCEndpointList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VPCList. +func (l *VPCList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + // GetItems of this VPCPeeringConnectionList. func (l *VPCPeeringConnectionList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) diff --git a/apis/ec2/v1alpha1/zz_generated.resolvers.go b/apis/ec2/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..50f483a --- /dev/null +++ b/apis/ec2/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,193 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this SecurityGroup. +func (mg *SecurityGroup) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.VPCIDRef, + Selector: mg.Spec.ForProvider.VPCIDSelector, + To: reference.To{ + List: &VPCList{}, + Managed: &VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCID") + } + mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this SecurityGroupRule. +func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SecurityGroupID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.SecurityGroupIDRef, + Selector: mg.Spec.ForProvider.SecurityGroupIDSelector, + To: reference.To{ + List: &SecurityGroupList{}, + Managed: &SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SecurityGroupID") + } + mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this Subnet. +func (mg *Subnet) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.VPCIDRef, + Selector: mg.Spec.ForProvider.VPCIDSelector, + To: reference.To{ + List: &VPCList{}, + Managed: &VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCID") + } + mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this VPCEndpoint. +func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse + var err error + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.SecurityGroupIDSelector, + To: reference.To{ + List: &SecurityGroupList{}, + Managed: &SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SecurityGroupIds") + } + mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SubnetIDRefs, + Selector: mg.Spec.ForProvider.SubnetIDSelector, + To: reference.To{ + List: &SubnetList{}, + Managed: &Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetIds") + } + mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.VPCIDRef, + Selector: mg.Spec.ForProvider.VPCIDSelector, + To: reference.To{ + List: &VPCList{}, + Managed: &VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCID") + } + mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this VPCPeeringConnection. +func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PeerVPCID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.PeerVPCIDRef, + Selector: mg.Spec.ForProvider.PeerVPCIDSelector, + To: reference.To{ + List: &VPCList{}, + Managed: &VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.PeerVPCID") + } + mg.Spec.ForProvider.PeerVPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.PeerVPCIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.VPCIDRef, + Selector: mg.Spec.ForProvider.VPCIDSelector, + To: reference.To{ + List: &VPCList{}, + Managed: &VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCID") + } + mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/ec2/v1alpha1/zz_generated_terraformed.go b/apis/ec2/v1alpha1/zz_generated_terraformed.go index 99b955d..bde9e81 100755 --- a/apis/ec2/v1alpha1/zz_generated_terraformed.go +++ b/apis/ec2/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Route @@ -69,6 +74,46 @@ func (tr *Route) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Route +func (tr *Route) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Route +func (tr *Route) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Route using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Route) LateInitialize(attrs []byte) (bool, error) { @@ -87,6 +132,120 @@ func (tr *Route) GetTerraformSchemaVersion() int { return 0 } +// GetTerraformResourceType returns Terraform resource type for this SecurityGroup +func (mg *SecurityGroup) GetTerraformResourceType() string { + return "aws_security_group" +} + +// GetConnectionDetailsMapping for this SecurityGroup +func (tr *SecurityGroup) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this SecurityGroup +func (tr *SecurityGroup) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this SecurityGroup +func (tr *SecurityGroup) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this SecurityGroup +func (tr *SecurityGroup) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this SecurityGroup +func (tr *SecurityGroup) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this SecurityGroup +func (tr *SecurityGroup) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this SecurityGroup +func (tr *SecurityGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SecurityGroup +func (tr *SecurityGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this SecurityGroup using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *SecurityGroup) LateInitialize(attrs []byte) (bool, error) { + params := &SecurityGroupParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *SecurityGroup) GetTerraformSchemaVersion() int { + return 1 +} + // GetTerraformResourceType returns Terraform resource type for this SecurityGroupRule func (mg *SecurityGroupRule) GetTerraformResourceType() string { return "aws_security_group_rule" @@ -143,6 +302,46 @@ func (tr *SecurityGroupRule) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this SecurityGroupRule +func (tr *SecurityGroupRule) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SecurityGroupRule +func (tr *SecurityGroupRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SecurityGroupRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SecurityGroupRule) LateInitialize(attrs []byte) (bool, error) { @@ -161,6 +360,349 @@ func (tr *SecurityGroupRule) GetTerraformSchemaVersion() int { return 2 } +// GetTerraformResourceType returns Terraform resource type for this Subnet +func (mg *Subnet) GetTerraformResourceType() string { + return "aws_subnet" +} + +// GetConnectionDetailsMapping for this Subnet +func (tr *Subnet) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Subnet +func (tr *Subnet) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Subnet +func (tr *Subnet) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Subnet +func (tr *Subnet) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Subnet +func (tr *Subnet) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Subnet +func (tr *Subnet) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Subnet +func (tr *Subnet) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Subnet +func (tr *Subnet) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Subnet using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Subnet) LateInitialize(attrs []byte) (bool, error) { + params := &SubnetParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("AvailabilityZoneID")) + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Subnet) GetTerraformSchemaVersion() int { + return 1 +} + +// GetTerraformResourceType returns Terraform resource type for this VPC +func (mg *VPC) GetTerraformResourceType() string { + return "aws_vpc" +} + +// GetConnectionDetailsMapping for this VPC +func (tr *VPC) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VPC +func (tr *VPC) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VPC +func (tr *VPC) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VPC +func (tr *VPC) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VPC +func (tr *VPC) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VPC +func (tr *VPC) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VPC +func (tr *VPC) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VPC +func (tr *VPC) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VPC using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VPC) LateInitialize(attrs []byte) (bool, error) { + params := &VPCParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VPC) GetTerraformSchemaVersion() int { + return 1 +} + +// GetTerraformResourceType returns Terraform resource type for this VPCEndpoint +func (mg *VPCEndpoint) GetTerraformResourceType() string { + return "aws_vpc_endpoint" +} + +// GetConnectionDetailsMapping for this VPCEndpoint +func (tr *VPCEndpoint) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VPCEndpoint +func (tr *VPCEndpoint) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VPCEndpoint +func (tr *VPCEndpoint) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VPCEndpoint +func (tr *VPCEndpoint) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VPCEndpoint +func (tr *VPCEndpoint) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VPCEndpoint +func (tr *VPCEndpoint) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VPCEndpoint +func (tr *VPCEndpoint) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VPCEndpoint +func (tr *VPCEndpoint) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VPCEndpoint using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VPCEndpoint) LateInitialize(attrs []byte) (bool, error) { + params := &VPCEndpointParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VPCEndpoint) GetTerraformSchemaVersion() int { + return 0 +} + // GetTerraformResourceType returns Terraform resource type for this VPCPeeringConnection func (mg *VPCPeeringConnection) GetTerraformResourceType() string { return "aws_vpc_peering_connection" @@ -217,6 +759,46 @@ func (tr *VPCPeeringConnection) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this VPCPeeringConnection +func (tr *VPCPeeringConnection) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VPCPeeringConnection +func (tr *VPCPeeringConnection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VPCPeeringConnection using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VPCPeeringConnection) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/ec2/v1alpha1/zz_groupversion_info.go b/apis/ec2/v1alpha1/zz_groupversion_info.go index 2deccbf..ed86fe3 100755 --- a/apis/ec2/v1alpha1/zz_groupversion_info.go +++ b/apis/ec2/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/ec2/v1alpha1/zz_route_types.go b/apis/ec2/v1alpha1/zz_route_types.go index 9eb3383..f2ab28c 100755 --- a/apis/ec2/v1alpha1/zz_route_types.go +++ b/apis/ec2/v1alpha1/zz_route_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,51 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type RouteInitParameters struct { + + // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. + CarrierGatewayID *string `json:"carrierGatewayId,omitempty" tf:"carrier_gateway_id,omitempty"` + + // The Amazon Resource Name (ARN) of a core network. + CoreNetworkArn *string `json:"coreNetworkArn,omitempty" tf:"core_network_arn,omitempty"` + + // The destination CIDR block. + DestinationCidrBlock *string `json:"destinationCidrBlock,omitempty" tf:"destination_cidr_block,omitempty"` + + // The destination IPv6 CIDR block. + DestinationIPv6CidrBlock *string `json:"destinationIpv6CidrBlock,omitempty" tf:"destination_ipv6_cidr_block,omitempty"` + + // The ID of a managed prefix list destination. + DestinationPrefixListID *string `json:"destinationPrefixListId,omitempty" tf:"destination_prefix_list_id,omitempty"` + + // Identifier of a VPC Egress Only Internet Gateway. + EgressOnlyGatewayID *string `json:"egressOnlyGatewayId,omitempty" tf:"egress_only_gateway_id,omitempty"` + + // Identifier of a VPC internet gateway or a virtual private gateway. Specify local when updating a previously imported local route. + GatewayID *string `json:"gatewayId,omitempty" tf:"gateway_id,omitempty"` + + // Identifier of a Outpost local gateway. + LocalGatewayID *string `json:"localGatewayId,omitempty" tf:"local_gateway_id,omitempty"` + + // Identifier of a VPC NAT gateway. + NATGatewayID *string `json:"natGatewayId,omitempty" tf:"nat_gateway_id,omitempty"` + + // Identifier of an EC2 network interface. + NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id,omitempty"` + + // The ID of the routing table. + RouteTableID *string `json:"routeTableId,omitempty" tf:"route_table_id,omitempty"` + + // Identifier of an EC2 Transit Gateway. + TransitGatewayID *string `json:"transitGatewayId,omitempty" tf:"transit_gateway_id,omitempty"` + + // Identifier of a VPC Endpoint. + VPCEndpointID *string `json:"vpcEndpointId,omitempty" tf:"vpc_endpoint_id,omitempty"` + + // Identifier of a VPC peering connection. + VPCPeeringConnectionID *string `json:"vpcPeeringConnectionId,omitempty" tf:"vpc_peering_connection_id,omitempty"` +} + type RouteObservation struct { // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. @@ -141,6 +190,17 @@ type RouteParameters struct { type RouteSpec struct { v1.ResourceSpec `json:",inline"` ForProvider RouteParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 RouteInitParameters `json:"initProvider,omitempty"` } // RouteStatus defines the observed state of Route. @@ -161,8 +221,8 @@ type RouteStatus struct { type Route struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.routeTableId)",message="routeTableId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.routeTableId) || (has(self.initProvider) && has(self.initProvider.routeTableId))",message="spec.forProvider.routeTableId is a required parameter" Spec RouteSpec `json:"spec"` Status RouteStatus `json:"status,omitempty"` } diff --git a/apis/ec2/v1alpha1/zz_securitygroup_types.go b/apis/ec2/v1alpha1/zz_securitygroup_types.go new file mode 100755 index 0000000..56bbf58 --- /dev/null +++ b/apis/ec2/v1alpha1/zz_securitygroup_types.go @@ -0,0 +1,396 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type EgressInitParameters struct { + + // List of CIDR blocks. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port"` + + // List of IPv6 CIDR blocks. + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` + + // List of Prefix List IDs. + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + Protocol *string `json:"protocol,omitempty" tf:"protocol"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` + + // Whether the security group itself will be added as a source to this ingress rule. + Self *bool `json:"self,omitempty" tf:"self"` + + // End range port (or ICMP code if protocol is icmp). + ToPort *float64 `json:"toPort,omitempty" tf:"to_port"` +} + +type EgressObservation struct { + + // List of CIDR blocks. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port,omitempty"` + + // List of IPv6 CIDR blocks. + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks,omitempty"` + + // List of Prefix List IDs. + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids,omitempty"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"` + + // Whether the security group itself will be added as a source to this ingress rule. + Self *bool `json:"self,omitempty" tf:"self,omitempty"` + + // End range port (or ICMP code if protocol is icmp). + ToPort *float64 `json:"toPort,omitempty" tf:"to_port,omitempty"` +} + +type EgressParameters struct { + + // List of CIDR blocks. + // +kubebuilder:validation:Optional + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + // +kubebuilder:validation:Optional + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port"` + + // List of IPv6 CIDR blocks. + // +kubebuilder:validation:Optional + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` + + // List of Prefix List IDs. + // +kubebuilder:validation:Optional + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + // +kubebuilder:validation:Optional + Protocol *string `json:"protocol,omitempty" tf:"protocol"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + // +kubebuilder:validation:Optional + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` + + // Whether the security group itself will be added as a source to this ingress rule. + // +kubebuilder:validation:Optional + Self *bool `json:"self,omitempty" tf:"self"` + + // End range port (or ICMP code if protocol is icmp). + // +kubebuilder:validation:Optional + ToPort *float64 `json:"toPort,omitempty" tf:"to_port"` +} + +type IngressInitParameters struct { + + // List of CIDR blocks. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port"` + + // List of IPv6 CIDR blocks. + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` + + // List of Prefix List IDs. + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + Protocol *string `json:"protocol,omitempty" tf:"protocol"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` + + // Whether the security group itself will be added as a source to this ingress rule. + Self *bool `json:"self,omitempty" tf:"self"` + + // End range port (or ICMP code if protocol is icmp). + ToPort *float64 `json:"toPort,omitempty" tf:"to_port"` +} + +type IngressObservation struct { + + // List of CIDR blocks. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port,omitempty"` + + // List of IPv6 CIDR blocks. + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks,omitempty"` + + // List of Prefix List IDs. + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids,omitempty"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"` + + // Whether the security group itself will be added as a source to this ingress rule. + Self *bool `json:"self,omitempty" tf:"self,omitempty"` + + // End range port (or ICMP code if protocol is icmp). + ToPort *float64 `json:"toPort,omitempty" tf:"to_port,omitempty"` +} + +type IngressParameters struct { + + // List of CIDR blocks. + // +kubebuilder:validation:Optional + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description"` + + // Start port (or ICMP type number if protocol is icmp or icmpv6). + // +kubebuilder:validation:Optional + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port"` + + // List of IPv6 CIDR blocks. + // +kubebuilder:validation:Optional + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` + + // List of Prefix List IDs. + // +kubebuilder:validation:Optional + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` + + // Protocol. If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0. The supported values are defined in the IpProtocol argument on the IpPermission API reference.12. + // +kubebuilder:validation:Optional + Protocol *string `json:"protocol,omitempty" tf:"protocol"` + + // List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID. + // +kubebuilder:validation:Optional + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` + + // Whether the security group itself will be added as a source to this ingress rule. + // +kubebuilder:validation:Optional + Self *bool `json:"self,omitempty" tf:"self"` + + // End range port (or ICMP code if protocol is icmp). + // +kubebuilder:validation:Optional + ToPort *float64 `json:"toPort,omitempty" tf:"to_port"` +} + +type SecurityGroupInitParameters struct { + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + Egress []EgressInitParameters `json:"egress,omitempty" tf:"egress,omitempty"` + + // Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + Ingress []IngressInitParameters `json:"ingress,omitempty" tf:"ingress,omitempty"` + + // Name of the security group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default false. + RevokeRulesOnDelete *bool `json:"revokeRulesOnDelete,omitempty" tf:"revoke_rules_on_delete,omitempty"` + + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type SecurityGroupObservation struct { + + // ARN of the security group. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + Egress []EgressObservation `json:"egress,omitempty" tf:"egress,omitempty"` + + // ID of the security group. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + Ingress []IngressObservation `json:"ingress,omitempty" tf:"ingress,omitempty"` + + // Name of the security group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // Owner ID. + OwnerID *string `json:"ownerId,omitempty" tf:"owner_id,omitempty"` + + // This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default false. + RevokeRulesOnDelete *bool `json:"revokeRulesOnDelete,omitempty" tf:"revoke_rules_on_delete,omitempty"` + + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // VPC ID. Defaults to the region's default VPC. + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` +} + +type SecurityGroupParameters struct { + + // Security group description. Cannot be "". NOTE: This field maps to the AWS GroupDescription attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use tags. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + // +kubebuilder:validation:Optional + Egress []EgressParameters `json:"egress,omitempty" tf:"egress,omitempty"` + + // Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode. + // +kubebuilder:validation:Optional + Ingress []IngressParameters `json:"ingress,omitempty" tf:"ingress,omitempty"` + + // Name of the security group. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + // +kubebuilder:validation:Optional + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default false. + // +kubebuilder:validation:Optional + RevokeRulesOnDelete *bool `json:"revokeRulesOnDelete,omitempty" tf:"revoke_rules_on_delete,omitempty"` + + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // VPC ID. Defaults to the region's default VPC. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC + // +kubebuilder:validation:Optional + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` +} + +// SecurityGroupSpec defines the desired state of SecurityGroup +type SecurityGroupSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider SecurityGroupParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider SecurityGroupInitParameters `json:"initProvider,omitempty"` +} + +// SecurityGroupStatus defines the observed state of SecurityGroup. +type SecurityGroupStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider SecurityGroupObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// SecurityGroup is the Schema for the SecurityGroups API. Provides a security group resource. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type SecurityGroup struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + Spec SecurityGroupSpec `json:"spec"` + Status SecurityGroupStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SecurityGroupList contains a list of SecurityGroups +type SecurityGroupList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SecurityGroup `json:"items"` +} + +// Repository type metadata. +var ( + SecurityGroup_Kind = "SecurityGroup" + SecurityGroup_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: SecurityGroup_Kind}.String() + SecurityGroup_KindAPIVersion = SecurityGroup_Kind + "." + CRDGroupVersion.String() + SecurityGroup_GroupVersionKind = CRDGroupVersion.WithKind(SecurityGroup_Kind) +) + +func init() { + SchemeBuilder.Register(&SecurityGroup{}, &SecurityGroupList{}) +} diff --git a/apis/ec2/v1alpha1/zz_securitygrouprule_types.go b/apis/ec2/v1alpha1/zz_securitygrouprule_types.go index 269f4a2..5aa3db9 100755 --- a/apis/ec2/v1alpha1/zz_securitygrouprule_types.go +++ b/apis/ec2/v1alpha1/zz_securitygrouprule_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,40 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SecurityGroupRuleInitParameters struct { + + // List of CIDR blocks. Cannot be specified with source_security_group_id or self. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + + // Description of the rule. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Start port (or ICMP type number if protocol is "icmp" or "icmpv6"). + FromPort *float64 `json:"fromPort,omitempty" tf:"from_port,omitempty"` + + // List of IPv6 CIDR blocks. Cannot be specified with source_security_group_id or self. + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks,omitempty"` + + // List of Prefix List IDs. + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids,omitempty"` + + // Protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number + Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + + // Whether the security group itself will be added as a source to this ingress rule. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or source_security_group_id. + Self *bool `json:"self,omitempty" tf:"self,omitempty"` + + // Security group id to allow access to/from, depending on the type. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or self. + SourceSecurityGroupID *string `json:"sourceSecurityGroupId,omitempty" tf:"source_security_group_id,omitempty"` + + // End port (or ICMP code if protocol is "icmp"). + ToPort *float64 `json:"toPort,omitempty" tf:"to_port,omitempty"` + + // Type of rule being created. Valid options are ingress (inbound) + // or egress (outbound). + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + type SecurityGroupRuleObservation struct { // List of CIDR blocks. Cannot be specified with source_security_group_id or self. @@ -88,9 +126,18 @@ type SecurityGroupRuleParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Security group to apply this rule to. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup // +kubebuilder:validation:Optional SecurityGroupID *string `json:"securityGroupId,omitempty" tf:"security_group_id,omitempty"` + // Reference to a SecurityGroup in ec2 to populate securityGroupId. + // +kubebuilder:validation:Optional + SecurityGroupIDRef *v1.Reference `json:"securityGroupIdRef,omitempty" tf:"-"` + + // Selector for a SecurityGroup in ec2 to populate securityGroupId. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // Whether the security group itself will be added as a source to this ingress rule. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or source_security_group_id. // +kubebuilder:validation:Optional Self *bool `json:"self,omitempty" tf:"self,omitempty"` @@ -113,6 +160,17 @@ type SecurityGroupRuleParameters struct { type SecurityGroupRuleSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SecurityGroupRuleParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SecurityGroupRuleInitParameters `json:"initProvider,omitempty"` } // SecurityGroupRuleStatus defines the observed state of SecurityGroupRule. @@ -133,12 +191,11 @@ type SecurityGroupRuleStatus struct { type SecurityGroupRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.fromPort)",message="fromPort is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.protocol)",message="protocol is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.securityGroupId)",message="securityGroupId is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.toPort)",message="toPort is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.type)",message="type is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.fromPort) || (has(self.initProvider) && has(self.initProvider.fromPort))",message="spec.forProvider.fromPort is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.protocol) || (has(self.initProvider) && has(self.initProvider.protocol))",message="spec.forProvider.protocol is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.toPort) || (has(self.initProvider) && has(self.initProvider.toPort))",message="spec.forProvider.toPort is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter" Spec SecurityGroupRuleSpec `json:"spec"` Status SecurityGroupRuleStatus `json:"status,omitempty"` } diff --git a/apis/ec2/v1alpha1/zz_subnet_types.go b/apis/ec2/v1alpha1/zz_subnet_types.go new file mode 100755 index 0000000..0f1ea49 --- /dev/null +++ b/apis/ec2/v1alpha1/zz_subnet_types.go @@ -0,0 +1,306 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type SubnetInitParameters struct { + + // Specify true to indicate + // that network interfaces created in the specified subnet should be + // assigned an IPv6 address. Default is false + AssignIPv6AddressOnCreation *bool `json:"assignIpv6AddressOnCreation,omitempty" tf:"assign_ipv6_address_on_creation,omitempty"` + + // AZ for the subnet. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use availability_zone instead. + AvailabilityZoneID *string `json:"availabilityZoneId,omitempty" tf:"availability_zone_id,omitempty"` + + // The IPv4 CIDR block for the subnet. + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // The customer owned IPv4 address pool. Typically used with the map_customer_owned_ip_on_launch argument. The outpost_arn argument must be specified when configured. + CustomerOwnedIPv4Pool *string `json:"customerOwnedIpv4Pool,omitempty" tf:"customer_owned_ipv4_pool,omitempty"` + + // Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: false. + EnableDns64 *bool `json:"enableDns64,omitempty" tf:"enable_dns64,omitempty"` + + // Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0). + EnableLniAtDeviceIndex *float64 `json:"enableLniAtDeviceIndex,omitempty" tf:"enable_lni_at_device_index,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: false. + EnableResourceNameDNSARecordOnLaunch *bool `json:"enableResourceNameDnsARecordOnLaunch,omitempty" tf:"enable_resource_name_dns_a_record_on_launch,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: false. + EnableResourceNameDNSAaaaRecordOnLaunch *bool `json:"enableResourceNameDnsAaaaRecordOnLaunch,omitempty" tf:"enable_resource_name_dns_aaaa_record_on_launch,omitempty"` + + // The IPv6 network range for the subnet, + // in CIDR notation. The subnet size must use a /64 prefix length. + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // Indicates whether to create an IPv6-only subnet. Default: false. + IPv6Native *bool `json:"ipv6Native,omitempty" tf:"ipv6_native,omitempty"` + + // Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The customer_owned_ipv4_pool and outpost_arn arguments must be specified when set to true. Default is false. + MapCustomerOwnedIPOnLaunch *bool `json:"mapCustomerOwnedIpOnLaunch,omitempty" tf:"map_customer_owned_ip_on_launch,omitempty"` + + // Specify true to indicate + // that instances launched into the subnet should be assigned + // a public IP address. Default is false. + MapPublicIPOnLaunch *bool `json:"mapPublicIpOnLaunch,omitempty" tf:"map_public_ip_on_launch,omitempty"` + + // The Amazon Resource Name (ARN) of the Outpost. + OutpostArn *string `json:"outpostArn,omitempty" tf:"outpost_arn,omitempty"` + + // The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name, resource-name. + PrivateDNSHostnameTypeOnLaunch *string `json:"privateDnsHostnameTypeOnLaunch,omitempty" tf:"private_dns_hostname_type_on_launch,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type SubnetObservation struct { + + // The ARN of the subnet. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Specify true to indicate + // that network interfaces created in the specified subnet should be + // assigned an IPv6 address. Default is false + AssignIPv6AddressOnCreation *bool `json:"assignIpv6AddressOnCreation,omitempty" tf:"assign_ipv6_address_on_creation,omitempty"` + + // AZ for the subnet. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use availability_zone instead. + AvailabilityZoneID *string `json:"availabilityZoneId,omitempty" tf:"availability_zone_id,omitempty"` + + // The IPv4 CIDR block for the subnet. + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // The customer owned IPv4 address pool. Typically used with the map_customer_owned_ip_on_launch argument. The outpost_arn argument must be specified when configured. + CustomerOwnedIPv4Pool *string `json:"customerOwnedIpv4Pool,omitempty" tf:"customer_owned_ipv4_pool,omitempty"` + + // Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: false. + EnableDns64 *bool `json:"enableDns64,omitempty" tf:"enable_dns64,omitempty"` + + // Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0). + EnableLniAtDeviceIndex *float64 `json:"enableLniAtDeviceIndex,omitempty" tf:"enable_lni_at_device_index,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: false. + EnableResourceNameDNSARecordOnLaunch *bool `json:"enableResourceNameDnsARecordOnLaunch,omitempty" tf:"enable_resource_name_dns_a_record_on_launch,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: false. + EnableResourceNameDNSAaaaRecordOnLaunch *bool `json:"enableResourceNameDnsAaaaRecordOnLaunch,omitempty" tf:"enable_resource_name_dns_aaaa_record_on_launch,omitempty"` + + // The ID of the subnet + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The IPv6 network range for the subnet, + // in CIDR notation. The subnet size must use a /64 prefix length. + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // The association ID for the IPv6 CIDR block. + IPv6CidrBlockAssociationID *string `json:"ipv6CidrBlockAssociationId,omitempty" tf:"ipv6_cidr_block_association_id,omitempty"` + + // Indicates whether to create an IPv6-only subnet. Default: false. + IPv6Native *bool `json:"ipv6Native,omitempty" tf:"ipv6_native,omitempty"` + + // Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The customer_owned_ipv4_pool and outpost_arn arguments must be specified when set to true. Default is false. + MapCustomerOwnedIPOnLaunch *bool `json:"mapCustomerOwnedIpOnLaunch,omitempty" tf:"map_customer_owned_ip_on_launch,omitempty"` + + // Specify true to indicate + // that instances launched into the subnet should be assigned + // a public IP address. Default is false. + MapPublicIPOnLaunch *bool `json:"mapPublicIpOnLaunch,omitempty" tf:"map_public_ip_on_launch,omitempty"` + + // The Amazon Resource Name (ARN) of the Outpost. + OutpostArn *string `json:"outpostArn,omitempty" tf:"outpost_arn,omitempty"` + + // The ID of the AWS account that owns the subnet. + OwnerID *string `json:"ownerId,omitempty" tf:"owner_id,omitempty"` + + // The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name, resource-name. + PrivateDNSHostnameTypeOnLaunch *string `json:"privateDnsHostnameTypeOnLaunch,omitempty" tf:"private_dns_hostname_type_on_launch,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The VPC ID. + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` +} + +type SubnetParameters struct { + + // Specify true to indicate + // that network interfaces created in the specified subnet should be + // assigned an IPv6 address. Default is false + // +kubebuilder:validation:Optional + AssignIPv6AddressOnCreation *bool `json:"assignIpv6AddressOnCreation,omitempty" tf:"assign_ipv6_address_on_creation,omitempty"` + + // AZ for the subnet. + // +kubebuilder:validation:Optional + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use availability_zone instead. + // +kubebuilder:validation:Optional + AvailabilityZoneID *string `json:"availabilityZoneId,omitempty" tf:"availability_zone_id,omitempty"` + + // The IPv4 CIDR block for the subnet. + // +kubebuilder:validation:Optional + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // The customer owned IPv4 address pool. Typically used with the map_customer_owned_ip_on_launch argument. The outpost_arn argument must be specified when configured. + // +kubebuilder:validation:Optional + CustomerOwnedIPv4Pool *string `json:"customerOwnedIpv4Pool,omitempty" tf:"customer_owned_ipv4_pool,omitempty"` + + // Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: false. + // +kubebuilder:validation:Optional + EnableDns64 *bool `json:"enableDns64,omitempty" tf:"enable_dns64,omitempty"` + + // Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0). + // +kubebuilder:validation:Optional + EnableLniAtDeviceIndex *float64 `json:"enableLniAtDeviceIndex,omitempty" tf:"enable_lni_at_device_index,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: false. + // +kubebuilder:validation:Optional + EnableResourceNameDNSARecordOnLaunch *bool `json:"enableResourceNameDnsARecordOnLaunch,omitempty" tf:"enable_resource_name_dns_a_record_on_launch,omitempty"` + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: false. + // +kubebuilder:validation:Optional + EnableResourceNameDNSAaaaRecordOnLaunch *bool `json:"enableResourceNameDnsAaaaRecordOnLaunch,omitempty" tf:"enable_resource_name_dns_aaaa_record_on_launch,omitempty"` + + // The IPv6 network range for the subnet, + // in CIDR notation. The subnet size must use a /64 prefix length. + // +kubebuilder:validation:Optional + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // Indicates whether to create an IPv6-only subnet. Default: false. + // +kubebuilder:validation:Optional + IPv6Native *bool `json:"ipv6Native,omitempty" tf:"ipv6_native,omitempty"` + + // Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The customer_owned_ipv4_pool and outpost_arn arguments must be specified when set to true. Default is false. + // +kubebuilder:validation:Optional + MapCustomerOwnedIPOnLaunch *bool `json:"mapCustomerOwnedIpOnLaunch,omitempty" tf:"map_customer_owned_ip_on_launch,omitempty"` + + // Specify true to indicate + // that instances launched into the subnet should be assigned + // a public IP address. Default is false. + // +kubebuilder:validation:Optional + MapPublicIPOnLaunch *bool `json:"mapPublicIpOnLaunch,omitempty" tf:"map_public_ip_on_launch,omitempty"` + + // The Amazon Resource Name (ARN) of the Outpost. + // +kubebuilder:validation:Optional + OutpostArn *string `json:"outpostArn,omitempty" tf:"outpost_arn,omitempty"` + + // The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name, resource-name. + // +kubebuilder:validation:Optional + PrivateDNSHostnameTypeOnLaunch *string `json:"privateDnsHostnameTypeOnLaunch,omitempty" tf:"private_dns_hostname_type_on_launch,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The VPC ID. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC + // +kubebuilder:validation:Optional + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` +} + +// SubnetSpec defines the desired state of Subnet +type SubnetSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider SubnetParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider SubnetInitParameters `json:"initProvider,omitempty"` +} + +// SubnetStatus defines the observed state of Subnet. +type SubnetStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider SubnetObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Subnet is the Schema for the Subnets API. Provides an VPC subnet resource. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type Subnet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + Spec SubnetSpec `json:"spec"` + Status SubnetStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SubnetList contains a list of Subnets +type SubnetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Subnet `json:"items"` +} + +// Repository type metadata. +var ( + Subnet_Kind = "Subnet" + Subnet_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Subnet_Kind}.String() + Subnet_KindAPIVersion = Subnet_Kind + "." + CRDGroupVersion.String() + Subnet_GroupVersionKind = CRDGroupVersion.WithKind(Subnet_Kind) +) + +func init() { + SchemeBuilder.Register(&Subnet{}, &SubnetList{}) +} diff --git a/apis/ec2/v1alpha1/zz_vpc_types.go b/apis/ec2/v1alpha1/zz_vpc_types.go new file mode 100755 index 0000000..b9a90c6 --- /dev/null +++ b/apis/ec2/v1alpha1/zz_vpc_types.go @@ -0,0 +1,262 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type VPCInitParameters struct { + + // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is false. Conflicts with ipv6_ipam_pool_id + AssignGeneratedIPv6CidrBlock *bool `json:"assignGeneratedIpv6CidrBlock,omitempty" tf:"assign_generated_ipv6_cidr_block,omitempty"` + + // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using ipv4_netmask_length. + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. + EnableDNSHostnames *bool `json:"enableDnsHostnames,omitempty" tf:"enable_dns_hostnames,omitempty"` + + // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. + EnableDNSSupport *bool `json:"enableDnsSupport,omitempty" tf:"enable_dns_support,omitempty"` + + // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. + EnableNetworkAddressUsageMetrics *bool `json:"enableNetworkAddressUsageMetrics,omitempty" tf:"enable_network_address_usage_metrics,omitempty"` + + // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. + IPv4IpamPoolID *string `json:"ipv4IpamPoolId,omitempty" tf:"ipv4_ipam_pool_id,omitempty"` + + // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4_ipam_pool_id. + IPv4NetmaskLength *float64 `json:"ipv4NetmaskLength,omitempty" tf:"ipv4_netmask_length,omitempty"` + + // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6_netmask_length. + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // By default when an IPv6 CIDR is assigned to a VPC a default ipv6_cidr_block_network_border_group will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. + IPv6CidrBlockNetworkBorderGroup *string `json:"ipv6CidrBlockNetworkBorderGroup,omitempty" tf:"ipv6_cidr_block_network_border_group,omitempty"` + + // IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + IPv6IpamPoolID *string `json:"ipv6IpamPoolId,omitempty" tf:"ipv6_ipam_pool_id,omitempty"` + + // Netmask length to request from IPAM Pool. Conflicts with ipv6_cidr_block. This can be omitted if IPAM pool as a allocation_default_netmask_length set. Valid values: 56. + IPv6NetmaskLength *float64 `json:"ipv6NetmaskLength,omitempty" tf:"ipv6_netmask_length,omitempty"` + + // A tenancy option for instances launched into the VPC. Default is default, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is dedicated, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. + InstanceTenancy *string `json:"instanceTenancy,omitempty" tf:"instance_tenancy,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type VPCObservation struct { + + // Amazon Resource Name (ARN) of VPC + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is false. Conflicts with ipv6_ipam_pool_id + AssignGeneratedIPv6CidrBlock *bool `json:"assignGeneratedIpv6CidrBlock,omitempty" tf:"assign_generated_ipv6_cidr_block,omitempty"` + + // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using ipv4_netmask_length. + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // The ID of the VPC + DHCPOptionsID *string `json:"dhcpOptionsId,omitempty" tf:"dhcp_options_id,omitempty"` + + // The ID of the network ACL created by default on VPC creation + DefaultNetworkACLID *string `json:"defaultNetworkAclId,omitempty" tf:"default_network_acl_id,omitempty"` + + // The ID of the route table created by default on VPC creation + DefaultRouteTableID *string `json:"defaultRouteTableId,omitempty" tf:"default_route_table_id,omitempty"` + + // The ID of the security group created by default on VPC creation + DefaultSecurityGroupID *string `json:"defaultSecurityGroupId,omitempty" tf:"default_security_group_id,omitempty"` + + // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. + EnableDNSHostnames *bool `json:"enableDnsHostnames,omitempty" tf:"enable_dns_hostnames,omitempty"` + + // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. + EnableDNSSupport *bool `json:"enableDnsSupport,omitempty" tf:"enable_dns_support,omitempty"` + + // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. + EnableNetworkAddressUsageMetrics *bool `json:"enableNetworkAddressUsageMetrics,omitempty" tf:"enable_network_address_usage_metrics,omitempty"` + + // The ID of the VPC + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. + IPv4IpamPoolID *string `json:"ipv4IpamPoolId,omitempty" tf:"ipv4_ipam_pool_id,omitempty"` + + // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4_ipam_pool_id. + IPv4NetmaskLength *float64 `json:"ipv4NetmaskLength,omitempty" tf:"ipv4_netmask_length,omitempty"` + + // The association ID for the IPv6 CIDR block. + IPv6AssociationID *string `json:"ipv6AssociationId,omitempty" tf:"ipv6_association_id,omitempty"` + + // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6_netmask_length. + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // By default when an IPv6 CIDR is assigned to a VPC a default ipv6_cidr_block_network_border_group will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. + IPv6CidrBlockNetworkBorderGroup *string `json:"ipv6CidrBlockNetworkBorderGroup,omitempty" tf:"ipv6_cidr_block_network_border_group,omitempty"` + + // IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + IPv6IpamPoolID *string `json:"ipv6IpamPoolId,omitempty" tf:"ipv6_ipam_pool_id,omitempty"` + + // Netmask length to request from IPAM Pool. Conflicts with ipv6_cidr_block. This can be omitted if IPAM pool as a allocation_default_netmask_length set. Valid values: 56. + IPv6NetmaskLength *float64 `json:"ipv6NetmaskLength,omitempty" tf:"ipv6_netmask_length,omitempty"` + + // A tenancy option for instances launched into the VPC. Default is default, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is dedicated, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. + InstanceTenancy *string `json:"instanceTenancy,omitempty" tf:"instance_tenancy,omitempty"` + + // The ID of the main route table associated with + // this VPC. Note that you can change a VPC's main route table by using an + // aws_main_route_table_association. + MainRouteTableID *string `json:"mainRouteTableId,omitempty" tf:"main_route_table_id,omitempty"` + + // The ID of the AWS account that owns the VPC. + OwnerID *string `json:"ownerId,omitempty" tf:"owner_id,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type VPCParameters struct { + + // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is false. Conflicts with ipv6_ipam_pool_id + // +kubebuilder:validation:Optional + AssignGeneratedIPv6CidrBlock *bool `json:"assignGeneratedIpv6CidrBlock,omitempty" tf:"assign_generated_ipv6_cidr_block,omitempty"` + + // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using ipv4_netmask_length. + // +kubebuilder:validation:Optional + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + + // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. + // +kubebuilder:validation:Optional + EnableDNSHostnames *bool `json:"enableDnsHostnames,omitempty" tf:"enable_dns_hostnames,omitempty"` + + // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. + // +kubebuilder:validation:Optional + EnableDNSSupport *bool `json:"enableDnsSupport,omitempty" tf:"enable_dns_support,omitempty"` + + // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. + // +kubebuilder:validation:Optional + EnableNetworkAddressUsageMetrics *bool `json:"enableNetworkAddressUsageMetrics,omitempty" tf:"enable_network_address_usage_metrics,omitempty"` + + // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. + // +kubebuilder:validation:Optional + IPv4IpamPoolID *string `json:"ipv4IpamPoolId,omitempty" tf:"ipv4_ipam_pool_id,omitempty"` + + // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4_ipam_pool_id. + // +kubebuilder:validation:Optional + IPv4NetmaskLength *float64 `json:"ipv4NetmaskLength,omitempty" tf:"ipv4_netmask_length,omitempty"` + + // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6_netmask_length. + // +kubebuilder:validation:Optional + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + + // By default when an IPv6 CIDR is assigned to a VPC a default ipv6_cidr_block_network_border_group will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. + // +kubebuilder:validation:Optional + IPv6CidrBlockNetworkBorderGroup *string `json:"ipv6CidrBlockNetworkBorderGroup,omitempty" tf:"ipv6_cidr_block_network_border_group,omitempty"` + + // IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + // +kubebuilder:validation:Optional + IPv6IpamPoolID *string `json:"ipv6IpamPoolId,omitempty" tf:"ipv6_ipam_pool_id,omitempty"` + + // Netmask length to request from IPAM Pool. Conflicts with ipv6_cidr_block. This can be omitted if IPAM pool as a allocation_default_netmask_length set. Valid values: 56. + // +kubebuilder:validation:Optional + IPv6NetmaskLength *float64 `json:"ipv6NetmaskLength,omitempty" tf:"ipv6_netmask_length,omitempty"` + + // A tenancy option for instances launched into the VPC. Default is default, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is dedicated, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. + // +kubebuilder:validation:Optional + InstanceTenancy *string `json:"instanceTenancy,omitempty" tf:"instance_tenancy,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +// VPCSpec defines the desired state of VPC +type VPCSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VPCParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 VPCInitParameters `json:"initProvider,omitempty"` +} + +// VPCStatus defines the observed state of VPC. +type VPCStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VPCObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// VPC is the Schema for the VPCs API. Provides a VPC resource. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type VPC 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.region)",message="spec.forProvider.region is a required parameter" + Spec VPCSpec `json:"spec"` + Status VPCStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VPCList contains a list of VPCs +type VPCList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VPC `json:"items"` +} + +// Repository type metadata. +var ( + VPC_Kind = "VPC" + VPC_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VPC_Kind}.String() + VPC_KindAPIVersion = VPC_Kind + "." + CRDGroupVersion.String() + VPC_GroupVersionKind = CRDGroupVersion.WithKind(VPC_Kind) +) + +func init() { + SchemeBuilder.Register(&VPC{}, &VPCList{}) +} diff --git a/apis/ec2/v1alpha1/zz_vpcendpoint_types.go b/apis/ec2/v1alpha1/zz_vpcendpoint_types.go new file mode 100755 index 0000000..2d9adb1 --- /dev/null +++ b/apis/ec2/v1alpha1/zz_vpcendpoint_types.go @@ -0,0 +1,312 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type DNSEntryInitParameters struct { +} + +type DNSEntryObservation struct { + + // The DNS name. + DNSName *string `json:"dnsName,omitempty" tf:"dns_name,omitempty"` + + // The ID of the private hosted zone. + HostedZoneID *string `json:"hostedZoneId,omitempty" tf:"hosted_zone_id,omitempty"` +} + +type DNSEntryParameters struct { +} + +type DNSOptionsInitParameters struct { + + // The DNS records created for the endpoint. Valid values are ipv4, dualstack, service-defined, and ipv6. + DNSRecordIPType *string `json:"dnsRecordIpType,omitempty" tf:"dns_record_ip_type,omitempty"` +} + +type DNSOptionsObservation struct { + + // The DNS records created for the endpoint. Valid values are ipv4, dualstack, service-defined, and ipv6. + DNSRecordIPType *string `json:"dnsRecordIpType,omitempty" tf:"dns_record_ip_type,omitempty"` +} + +type DNSOptionsParameters struct { + + // The DNS records created for the endpoint. Valid values are ipv4, dualstack, service-defined, and ipv6. + // +kubebuilder:validation:Optional + DNSRecordIPType *string `json:"dnsRecordIpType,omitempty" tf:"dns_record_ip_type,omitempty"` +} + +type VPCEndpointInitParameters struct { + + // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). + AutoAccept *bool `json:"autoAccept,omitempty" tf:"auto_accept,omitempty"` + + // The DNS options for the endpoint. See dns_options below. + DNSOptions []DNSOptionsInitParameters `json:"dnsOptions,omitempty" tf:"dns_options,omitempty"` + + // The IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6. + IPAddressType *string `json:"ipAddressType,omitempty" tf:"ip_address_type,omitempty"` + + // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All Gateway and some Interface endpoints support policies - see the relevant AWS documentation for more details. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. + // Defaults to false. + PrivateDNSEnabled *bool `json:"privateDnsEnabled,omitempty" tf:"private_dns_enabled,omitempty"` + + // One or more route table IDs. Applicable for endpoints of type Gateway. + RouteTableIds []*string `json:"routeTableIds,omitempty" tf:"route_table_ids,omitempty"` + + // The service name. For AWS services the service name is usually in the form com.amazonaws.. (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker..notebook). + ServiceName *string `json:"serviceName,omitempty" tf:"service_name,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The VPC endpoint type, Gateway, GatewayLoadBalancer, or Interface. Defaults to Gateway. + VPCEndpointType *string `json:"vpcEndpointType,omitempty" tf:"vpc_endpoint_type,omitempty"` +} + +type VPCEndpointObservation struct { + + // The Amazon Resource Name (ARN) of the VPC endpoint. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). + AutoAccept *bool `json:"autoAccept,omitempty" tf:"auto_accept,omitempty"` + + // The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type Gateway. + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + + // The DNS entries for the VPC Endpoint. Applicable for endpoints of type Interface. DNS blocks are documented below. + DNSEntry []DNSEntryObservation `json:"dnsEntry,omitempty" tf:"dns_entry,omitempty"` + + // The DNS options for the endpoint. See dns_options below. + DNSOptions []DNSOptionsObservation `json:"dnsOptions,omitempty" tf:"dns_options,omitempty"` + + // The ID of the VPC endpoint. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6. + IPAddressType *string `json:"ipAddressType,omitempty" tf:"ip_address_type,omitempty"` + + // One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type Interface. + NetworkInterfaceIds []*string `json:"networkInterfaceIds,omitempty" tf:"network_interface_ids,omitempty"` + + // The ID of the AWS account that owns the VPC endpoint. + OwnerID *string `json:"ownerId,omitempty" tf:"owner_id,omitempty"` + + // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All Gateway and some Interface endpoints support policies - see the relevant AWS documentation for more details. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // The prefix list ID of the exposed AWS service. Applicable for endpoints of type Gateway. + PrefixListID *string `json:"prefixListId,omitempty" tf:"prefix_list_id,omitempty"` + + // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. + // Defaults to false. + PrivateDNSEnabled *bool `json:"privateDnsEnabled,omitempty" tf:"private_dns_enabled,omitempty"` + + // Whether or not the VPC Endpoint is being managed by its service - true or false. + RequesterManaged *bool `json:"requesterManaged,omitempty" tf:"requester_managed,omitempty"` + + // One or more route table IDs. Applicable for endpoints of type Gateway. + RouteTableIds []*string `json:"routeTableIds,omitempty" tf:"route_table_ids,omitempty"` + + // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type Interface. + // If no security groups are specified, the VPC's default security group is associated with the endpoint. + SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` + + // The service name. For AWS services the service name is usually in the form com.amazonaws.. (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker..notebook). + ServiceName *string `json:"serviceName,omitempty" tf:"service_name,omitempty"` + + // The state of the VPC endpoint. + State *string `json:"state,omitempty" tf:"state,omitempty"` + + // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type GatewayLoadBalancer and Interface. + SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The VPC endpoint type, Gateway, GatewayLoadBalancer, or Interface. Defaults to Gateway. + VPCEndpointType *string `json:"vpcEndpointType,omitempty" tf:"vpc_endpoint_type,omitempty"` + + // The ID of the VPC in which the endpoint will be used. + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` +} + +type VPCEndpointParameters struct { + + // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). + // +kubebuilder:validation:Optional + AutoAccept *bool `json:"autoAccept,omitempty" tf:"auto_accept,omitempty"` + + // The DNS options for the endpoint. See dns_options below. + // +kubebuilder:validation:Optional + DNSOptions []DNSOptionsParameters `json:"dnsOptions,omitempty" tf:"dns_options,omitempty"` + + // The IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6. + // +kubebuilder:validation:Optional + IPAddressType *string `json:"ipAddressType,omitempty" tf:"ip_address_type,omitempty"` + + // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All Gateway and some Interface endpoints support policies - see the relevant AWS documentation for more details. + // +kubebuilder:validation:Optional + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. + // Defaults to false. + // +kubebuilder:validation:Optional + PrivateDNSEnabled *bool `json:"privateDnsEnabled,omitempty" tf:"private_dns_enabled,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // One or more route table IDs. Applicable for endpoints of type Gateway. + // +kubebuilder:validation:Optional + RouteTableIds []*string `json:"routeTableIds,omitempty" tf:"route_table_ids,omitempty"` + + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + + // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type Interface. + // If no security groups are specified, the VPC's default security group is associated with the endpoint. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector + // +kubebuilder:validation:Optional + SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` + + // The service name. For AWS services the service name is usually in the form com.amazonaws.. (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker..notebook). + // +kubebuilder:validation:Optional + ServiceName *string `json:"serviceName,omitempty" tf:"service_name,omitempty"` + + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + + // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type GatewayLoadBalancer and Interface. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector + // +kubebuilder:validation:Optional + SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The VPC endpoint type, Gateway, GatewayLoadBalancer, or Interface. Defaults to Gateway. + // +kubebuilder:validation:Optional + VPCEndpointType *string `json:"vpcEndpointType,omitempty" tf:"vpc_endpoint_type,omitempty"` + + // The ID of the VPC in which the endpoint will be used. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC + // +kubebuilder:validation:Optional + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` +} + +// VPCEndpointSpec defines the desired state of VPCEndpoint +type VPCEndpointSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VPCEndpointParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 VPCEndpointInitParameters `json:"initProvider,omitempty"` +} + +// VPCEndpointStatus defines the observed state of VPCEndpoint. +type VPCEndpointStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VPCEndpointObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// VPCEndpoint is the Schema for the VPCEndpoints API. Provides a VPC Endpoint resource. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type VPCEndpoint 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.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.serviceName) || (has(self.initProvider) && has(self.initProvider.serviceName))",message="spec.forProvider.serviceName is a required parameter" + Spec VPCEndpointSpec `json:"spec"` + Status VPCEndpointStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VPCEndpointList contains a list of VPCEndpoints +type VPCEndpointList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VPCEndpoint `json:"items"` +} + +// Repository type metadata. +var ( + VPCEndpoint_Kind = "VPCEndpoint" + VPCEndpoint_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VPCEndpoint_Kind}.String() + VPCEndpoint_KindAPIVersion = VPCEndpoint_Kind + "." + CRDGroupVersion.String() + VPCEndpoint_GroupVersionKind = CRDGroupVersion.WithKind(VPCEndpoint_Kind) +) + +func init() { + SchemeBuilder.Register(&VPCEndpoint{}, &VPCEndpointList{}) +} diff --git a/apis/ec2/v1alpha1/zz_vpcpeeringconnection_types.go b/apis/ec2/v1alpha1/zz_vpcpeeringconnection_types.go index df2d756..1519511 100755 --- a/apis/ec2/v1alpha1/zz_vpcpeeringconnection_types.go +++ b/apis/ec2/v1alpha1/zz_vpcpeeringconnection_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,13 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AccepterInitParameters struct { + + // Allow a local VPC to resolve public DNS hostnames to + // private IP addresses when queried from instances in the peer VPC. + AllowRemoteVPCDNSResolution *bool `json:"allowRemoteVpcDnsResolution,omitempty" tf:"allow_remote_vpc_dns_resolution,omitempty"` +} + type AccepterObservation struct { // Allow a local VPC to resolve public DNS hostnames to @@ -28,6 +39,13 @@ type AccepterParameters struct { AllowRemoteVPCDNSResolution *bool `json:"allowRemoteVpcDnsResolution,omitempty" tf:"allow_remote_vpc_dns_resolution,omitempty"` } +type RequesterInitParameters struct { + + // Allow a local VPC to resolve public DNS hostnames to + // private IP addresses when queried from instances in the peer VPC. + AllowRemoteVPCDNSResolution *bool `json:"allowRemoteVpcDnsResolution,omitempty" tf:"allow_remote_vpc_dns_resolution,omitempty"` +} + type RequesterObservation struct { // Allow a local VPC to resolve public DNS hostnames to @@ -43,6 +61,34 @@ type RequesterParameters struct { AllowRemoteVPCDNSResolution *bool `json:"allowRemoteVpcDnsResolution,omitempty" tf:"allow_remote_vpc_dns_resolution,omitempty"` } +type VPCPeeringConnectionInitParameters struct { + + // An optional configuration block that allows for VPC Peering Connection options to be set for the VPC that accepts + // the peering connection (a maximum of one). + Accepter []AccepterInitParameters `json:"accepter,omitempty" tf:"accepter,omitempty"` + + // Accept the peering (both VPCs need to be in the same AWS account and region). + AutoAccept *bool `json:"autoAccept,omitempty" tf:"auto_accept,omitempty"` + + // The AWS account ID of the owner of the peer VPC. + // Defaults to the account ID the AWS provider is currently connected to. + PeerOwnerID *string `json:"peerOwnerId,omitempty" tf:"peer_owner_id,omitempty"` + + // The region of the accepter VPC of the VPC Peering Connection. auto_accept must be false, + // and use the aws_vpc_peering_connection_accepter to manage the accepter side. + PeerRegion *string `json:"peerRegion,omitempty" tf:"peer_region,omitempty"` + + // A optional configuration block that allows for VPC Peering Connection options to be set for the VPC that requests + // the peering connection (a maximum of one). + Requester []RequesterInitParameters `json:"requester,omitempty" tf:"requester,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type VPCPeeringConnectionObservation struct { // The status of the VPC Peering Connection request. @@ -105,9 +151,19 @@ type VPCPeeringConnectionParameters struct { PeerRegion *string `json:"peerRegion,omitempty" tf:"peer_region,omitempty"` // The ID of the VPC with which you are creating the VPC Peering Connection. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional PeerVPCID *string `json:"peerVpcId,omitempty" tf:"peer_vpc_id,omitempty"` + // Reference to a VPC in ec2 to populate peerVpcId. + // +kubebuilder:validation:Optional + PeerVPCIDRef *v1.Reference `json:"peerVpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in ec2 to populate peerVpcId. + // +kubebuilder:validation:Optional + PeerVPCIDSelector *v1.Selector `json:"peerVpcIdSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -127,14 +183,34 @@ type VPCPeeringConnectionParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` // The ID of the requester VPC. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC // +kubebuilder:validation:Optional VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in ec2 to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` } // VPCPeeringConnectionSpec defines the desired state of VPCPeeringConnection type VPCPeeringConnectionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider VPCPeeringConnectionParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 VPCPeeringConnectionInitParameters `json:"initProvider,omitempty"` } // VPCPeeringConnectionStatus defines the observed state of VPCPeeringConnection. @@ -155,9 +231,7 @@ type VPCPeeringConnectionStatus struct { type VPCPeeringConnection struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.peerVpcId)",message="peerVpcId is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcId)",message="vpcId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec VPCPeeringConnectionSpec `json:"spec"` Status VPCPeeringConnectionStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_cluster_types.go b/apis/elasticache/v1alpha1/zz_cluster_types.go index 541c2ec..e8ef657 100755 --- a/apis/elasticache/v1alpha1/zz_cluster_types.go +++ b/apis/elasticache/v1alpha1/zz_cluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,9 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type CacheNodesInitParameters struct { +} + type CacheNodesObservation struct { Address *string `json:"address,omitempty" tf:"address,omitempty"` @@ -31,6 +38,90 @@ type CacheNodesObservation struct { type CacheNodesParameters struct { } +type ClusterInitParameters struct { + + // Whether any database modifications are applied immediately, or during the next maintenance window. Default is false. See Amazon ElastiCache Documentation for more information.. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. + // Only supported for engine type "redis" and if the engine version is 6 or higher. + // Defaults to true. + AutoMinorVersionUpgrade *string `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use preferred_availability_zones instead. Default: System chosen Availability Zone. Changing this value will re-create the resource. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // Whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num_cache_nodes must be greater than 1. + AzMode *string `json:"azMode,omitempty" tf:"az_mode,omitempty"` + + // – Name of the cache engine to be used for this cache cluster. Valid values are memcached or redis. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // – Version number of the cache engine to be used. + // If not set, defaults to the latest version. + // See Describe Cache Engine Versions in the AWS Documentation for supported versions. + // When engine is redis and the version is 6 or higher, the major and minor version can be set, e.g., 6.2, + // or the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x. + // Otherwise, specify the full version desired, e.g., 5.0.6. + // The actual engine version used is returned in the attribute engine_version_actual, see Attributes Reference below. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // Name of your final cluster snapshot. If omitted, no final snapshot will be made. + FinalSnapshotIdentifier *string `json:"finalSnapshotIdentifier,omitempty" tf:"final_snapshot_identifier,omitempty"` + + // The IP version to advertise in the discovery protocol. Valid values are ipv4 or ipv6. + IPDiscovery *string `json:"ipDiscovery,omitempty" tf:"ip_discovery,omitempty"` + + // Specifies the destination and format of Redis SLOWLOG or Redis Engine Log. See the documentation on Amazon ElastiCache. See Log Delivery Configuration below for more details. + LogDeliveryConfiguration []LogDeliveryConfigurationInitParameters `json:"logDeliveryConfiguration,omitempty" tf:"log_delivery_configuration,omitempty"` + + // ddd:hh24:mi (24H Clock UTC). + // The minimum maintenance window is a 60 minute period. Example: sun:05:00-sun:09:00. + MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + + // The IP versions for cache cluster connections. IPv6 is supported with Redis engine 6.2 onword or Memcached version 1.6.6 for all Nitro system instances. Valid values are ipv4, ipv6 or dual_stack. + NetworkType *string `json:"networkType,omitempty" tf:"network_type,omitempty"` + + // create the resource. + NodeType *string `json:"nodeType,omitempty" tf:"node_type,omitempty"` + + // east-1:012345678999:my_sns_topic. + NotificationTopicArn *string `json:"notificationTopicArn,omitempty" tf:"notification_topic_arn,omitempty"` + + // – The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcached, this value must be between 1 and 40. If this number is reduced on subsequent runs, the highest numbered nodes will be removed. + NumCacheNodes *float64 `json:"numCacheNodes,omitempty" tf:"num_cache_nodes,omitempty"` + + // Specify the outpost mode that will apply to the cache cluster creation. Valid values are "single-outpost" and "cross-outpost", however AWS currently only supports "single-outpost" mode. + OutpostMode *string `json:"outpostMode,omitempty" tf:"outpost_mode,omitempty"` + + // create the resource. + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // List of the Availability Zones in which cache nodes are created. If you are creating your cluster in an Amazon VPC you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group. The number of Availability Zones listed must equal the value of num_cache_nodes. If you want all the nodes in the same Availability Zone, use availability_zone instead, or repeat the Availability Zone multiple times in the list. Default: System chosen Availability Zones. Detecting drift of existing node availability zone is not currently supported. Updating this argument by itself to migrate existing node availability zones is not currently supported and will show a perpetual difference. + PreferredAvailabilityZones []*string `json:"preferredAvailabilityZones,omitempty" tf:"preferred_availability_zones,omitempty"` + + // The outpost ARN in which the cache cluster will be created. + PreferredOutpostArn *string `json:"preferredOutpostArn,omitempty" tf:"preferred_outpost_arn,omitempty"` + + // element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. The object name cannot contain any commas. Changing snapshot_arns forces a new resource. + SnapshotArns []*string `json:"snapshotArns,omitempty" tf:"snapshot_arns,omitempty"` + + // Name of a snapshot from which to restore data into the new node group. Changing snapshot_name forces a new resource. + SnapshotName *string `json:"snapshotName,omitempty" tf:"snapshot_name,omitempty"` + + // Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a snapshot_retention_limit is not supported on cache.t1.micro cache nodes + SnapshotRetentionLimit *float64 `json:"snapshotRetentionLimit,omitempty" tf:"snapshot_retention_limit,omitempty"` + + // Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00 + SnapshotWindow *string `json:"snapshotWindow,omitempty" tf:"snapshot_window,omitempty"` + + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterObservation struct { // Whether any database modifications are applied immediately, or during the next maintenance window. Default is false. See Amazon ElastiCache Documentation for more information.. @@ -246,10 +337,31 @@ type ClusterParameters struct { Region *string `json:"region,omitempty" tf:"-"` // ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/elasticache/v1alpha1.ReplicationGroup + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional ReplicationGroupID *string `json:"replicationGroupId,omitempty" tf:"replication_group_id,omitempty"` + // Reference to a ReplicationGroup in elasticache to populate replicationGroupId. + // +kubebuilder:validation:Optional + ReplicationGroupIDRef *v1.Reference `json:"replicationGroupIdRef,omitempty" tf:"-"` + + // Selector for a ReplicationGroup in elasticache to populate replicationGroupId. + // +kubebuilder:validation:Optional + ReplicationGroupIDSelector *v1.Selector `json:"replicationGroupIdSelector,omitempty" tf:"-"` + + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // – One or more VPC security groups associated with the cache cluster + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector // +kubebuilder:validation:Optional SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` @@ -270,9 +382,18 @@ type ClusterParameters struct { SnapshotWindow *string `json:"snapshotWindow,omitempty" tf:"snapshot_window,omitempty"` // create the resource. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/elasticache/v1alpha1.SubnetGroup // +kubebuilder:validation:Optional SubnetGroupName *string `json:"subnetGroupName,omitempty" tf:"subnet_group_name,omitempty"` + // Reference to a SubnetGroup in elasticache to populate subnetGroupName. + // +kubebuilder:validation:Optional + SubnetGroupNameRef *v1.Reference `json:"subnetGroupNameRef,omitempty" tf:"-"` + + // Selector for a SubnetGroup in elasticache to populate subnetGroupName. + // +kubebuilder:validation:Optional + SubnetGroupNameSelector *v1.Selector `json:"subnetGroupNameSelector,omitempty" tf:"-"` + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. // +kubebuilder:validation:Optional Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` @@ -282,6 +403,21 @@ type ClusterParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type LogDeliveryConfigurationInitParameters struct { + + // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. + Destination *string `json:"destination,omitempty" tf:"destination,omitempty"` + + // For CloudWatch Logs use cloudwatch-logs or for Kinesis Data Firehose use kinesis-firehose. + DestinationType *string `json:"destinationType,omitempty" tf:"destination_type,omitempty"` + + // Valid values are json or text + LogFormat *string `json:"logFormat,omitempty" tf:"log_format,omitempty"` + + // Valid values are slow-log or engine-log. Max 1 of each. + LogType *string `json:"logType,omitempty" tf:"log_type,omitempty"` +} + type LogDeliveryConfigurationObservation struct { // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. @@ -300,19 +436,19 @@ type LogDeliveryConfigurationObservation struct { type LogDeliveryConfigurationParameters struct { // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Destination *string `json:"destination" tf:"destination,omitempty"` // For CloudWatch Logs use cloudwatch-logs or for Kinesis Data Firehose use kinesis-firehose. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional DestinationType *string `json:"destinationType" tf:"destination_type,omitempty"` // Valid values are json or text - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional LogFormat *string `json:"logFormat" tf:"log_format,omitempty"` // Valid values are slow-log or engine-log. Max 1 of each. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional LogType *string `json:"logType" tf:"log_type,omitempty"` } @@ -320,6 +456,17 @@ type LogDeliveryConfigurationParameters struct { type ClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInitParameters `json:"initProvider,omitempty"` } // ClusterStatus defines the observed state of Cluster. @@ -340,7 +487,7 @@ type ClusterStatus struct { type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_generated.deepcopy.go b/apis/elasticache/v1alpha1/zz_generated.deepcopy.go index 812564b..a7e99fe 100644 --- a/apis/elasticache/v1alpha1/zz_generated.deepcopy.go +++ b/apis/elasticache/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,26 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationModeInitParameters) DeepCopyInto(out *AuthenticationModeInitParameters) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationModeInitParameters. +func (in *AuthenticationModeInitParameters) DeepCopy() *AuthenticationModeInitParameters { + if in == nil { + return nil + } + out := new(AuthenticationModeInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthenticationModeObservation) DeepCopyInto(out *AuthenticationModeObservation) { *out = *in @@ -68,6 +87,21 @@ func (in *AuthenticationModeParameters) DeepCopy() *AuthenticationModeParameters return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CacheNodesInitParameters) DeepCopyInto(out *CacheNodesInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheNodesInitParameters. +func (in *CacheNodesInitParameters) DeepCopy() *CacheNodesInitParameters { + if in == nil { + return nil + } + out := new(CacheNodesInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CacheNodesObservation) DeepCopyInto(out *CacheNodesObservation) { *out = *in @@ -150,6 +184,177 @@ func (in *Cluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitParameters) DeepCopyInto(out *ClusterInitParameters) { + *out = *in + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(string) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.AzMode != nil { + in, out := &in.AzMode, &out.AzMode + *out = new(string) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.IPDiscovery != nil { + in, out := &in.IPDiscovery, &out.IPDiscovery + *out = new(string) + **out = **in + } + if in.LogDeliveryConfiguration != nil { + in, out := &in.LogDeliveryConfiguration, &out.LogDeliveryConfiguration + *out = make([]LogDeliveryConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MaintenanceWindow != nil { + in, out := &in.MaintenanceWindow, &out.MaintenanceWindow + *out = new(string) + **out = **in + } + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) + **out = **in + } + if in.NodeType != nil { + in, out := &in.NodeType, &out.NodeType + *out = new(string) + **out = **in + } + if in.NotificationTopicArn != nil { + in, out := &in.NotificationTopicArn, &out.NotificationTopicArn + *out = new(string) + **out = **in + } + if in.NumCacheNodes != nil { + in, out := &in.NumCacheNodes, &out.NumCacheNodes + *out = new(float64) + **out = **in + } + if in.OutpostMode != nil { + in, out := &in.OutpostMode, &out.OutpostMode + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PreferredAvailabilityZones != nil { + in, out := &in.PreferredAvailabilityZones, &out.PreferredAvailabilityZones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PreferredOutpostArn != nil { + in, out := &in.PreferredOutpostArn, &out.PreferredOutpostArn + *out = new(string) + **out = **in + } + if in.SnapshotArns != nil { + in, out := &in.SnapshotArns, &out.SnapshotArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SnapshotName != nil { + in, out := &in.SnapshotName, &out.SnapshotName + *out = new(string) + **out = **in + } + if in.SnapshotRetentionLimit != nil { + in, out := &in.SnapshotRetentionLimit, &out.SnapshotRetentionLimit + *out = new(float64) + **out = **in + } + if in.SnapshotWindow != nil { + in, out := &in.SnapshotWindow, &out.SnapshotWindow + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitParameters. +func (in *ClusterInitParameters) DeepCopy() *ClusterInitParameters { + if in == nil { + return nil + } + out := new(ClusterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterList) DeepCopyInto(out *ClusterList) { *out = *in @@ -375,7 +580,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -390,7 +596,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -535,6 +742,28 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.ReplicationGroupIDRef != nil { + in, out := &in.ReplicationGroupIDRef, &out.ReplicationGroupIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ReplicationGroupIDSelector != nil { + in, out := &in.ReplicationGroupIDSelector, &out.ReplicationGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecurityGroupIds != nil { in, out := &in.SecurityGroupIds, &out.SecurityGroupIds *out = make([]*string, len(*in)) @@ -577,6 +806,16 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.SubnetGroupNameRef != nil { + in, out := &in.SubnetGroupNameRef, &out.SubnetGroupNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SubnetGroupNameSelector != nil { + in, out := &in.SubnetGroupNameSelector, &out.SubnetGroupNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -585,7 +824,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -600,7 +840,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -624,6 +865,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -653,6 +895,41 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LogDeliveryConfigurationInitParameters) DeepCopyInto(out *LogDeliveryConfigurationInitParameters) { + *out = *in + if in.Destination != nil { + in, out := &in.Destination, &out.Destination + *out = new(string) + **out = **in + } + if in.DestinationType != nil { + in, out := &in.DestinationType, &out.DestinationType + *out = new(string) + **out = **in + } + if in.LogFormat != nil { + in, out := &in.LogFormat, &out.LogFormat + *out = new(string) + **out = **in + } + if in.LogType != nil { + in, out := &in.LogType, &out.LogType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogDeliveryConfigurationInitParameters. +func (in *LogDeliveryConfigurationInitParameters) DeepCopy() *LogDeliveryConfigurationInitParameters { + if in == nil { + return nil + } + out := new(LogDeliveryConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LogDeliveryConfigurationObservation) DeepCopyInto(out *LogDeliveryConfigurationObservation) { *out = *in @@ -751,19 +1028,88 @@ func (in *ParameterGroup) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ParameterGroupList) DeepCopyInto(out *ParameterGroupList) { +func (in *ParameterGroupInitParameters) DeepCopyInto(out *ParameterGroupInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ParameterGroup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Family != nil { + in, out := &in.Family, &out.Family + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ParameterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupInitParameters. +func (in *ParameterGroupInitParameters) DeepCopy() *ParameterGroupInitParameters { + if in == nil { + return nil + } + out := new(ParameterGroupInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterGroupList) DeepCopyInto(out *ParameterGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ParameterGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupList. func (in *ParameterGroupList) DeepCopy() *ParameterGroupList { if in == nil { @@ -825,7 +1171,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -840,7 +1187,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -897,7 +1245,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -912,7 +1261,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -936,6 +1286,7 @@ func (in *ParameterGroupSpec) DeepCopyInto(out *ParameterGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupSpec. @@ -965,6 +1316,31 @@ func (in *ParameterGroupStatus) DeepCopy() *ParameterGroupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterInitParameters) DeepCopyInto(out *ParameterInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterInitParameters. +func (in *ParameterInitParameters) DeepCopy() *ParameterInitParameters { + if in == nil { + return nil + } + out := new(ParameterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterObservation) DeepCopyInto(out *ParameterObservation) { *out = *in @@ -998,50 +1374,263 @@ func (in *ParameterParameters) DeepCopyInto(out *ParameterParameters) { *out = new(string) **out = **in } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterParameters. +func (in *ParameterParameters) DeepCopy() *ParameterParameters { + if in == nil { + return nil + } + out := new(ParameterParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicationGroup) DeepCopyInto(out *ReplicationGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationGroup. +func (in *ReplicationGroup) DeepCopy() *ReplicationGroup { + if in == nil { + return nil + } + out := new(ReplicationGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ReplicationGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicationGroupInitParameters) DeepCopyInto(out *ReplicationGroupInitParameters) { + *out = *in + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } + if in.AtRestEncryptionEnabled != nil { + in, out := &in.AtRestEncryptionEnabled, &out.AtRestEncryptionEnabled + *out = new(bool) + **out = **in + } + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(string) + **out = **in + } + if in.AutomaticFailoverEnabled != nil { + in, out := &in.AutomaticFailoverEnabled, &out.AutomaticFailoverEnabled + *out = new(bool) + **out = **in + } + if in.DataTieringEnabled != nil { + in, out := &in.DataTieringEnabled, &out.DataTieringEnabled + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.GlobalReplicationGroupID != nil { + in, out := &in.GlobalReplicationGroupID, &out.GlobalReplicationGroupID + *out = new(string) + **out = **in + } + if in.LogDeliveryConfiguration != nil { + in, out := &in.LogDeliveryConfiguration, &out.LogDeliveryConfiguration + *out = make([]ReplicationGroupLogDeliveryConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MaintenanceWindow != nil { + in, out := &in.MaintenanceWindow, &out.MaintenanceWindow + *out = new(string) + **out = **in + } + if in.MultiAzEnabled != nil { + in, out := &in.MultiAzEnabled, &out.MultiAzEnabled + *out = new(bool) + **out = **in + } + if in.NodeType != nil { + in, out := &in.NodeType, &out.NodeType + *out = new(string) + **out = **in + } + if in.NotificationTopicArn != nil { + in, out := &in.NotificationTopicArn, &out.NotificationTopicArn + *out = new(string) + **out = **in + } + if in.NumCacheClusters != nil { + in, out := &in.NumCacheClusters, &out.NumCacheClusters + *out = new(float64) + **out = **in + } + if in.NumNodeGroups != nil { + in, out := &in.NumNodeGroups, &out.NumNodeGroups + *out = new(float64) + **out = **in + } + if in.ParameterGroupName != nil { + in, out := &in.ParameterGroupName, &out.ParameterGroupName + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PreferredCacheClusterAzs != nil { + in, out := &in.PreferredCacheClusterAzs, &out.PreferredCacheClusterAzs + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ReplicasPerNodeGroup != nil { + in, out := &in.ReplicasPerNodeGroup, &out.ReplicasPerNodeGroup + *out = new(float64) + **out = **in + } + if in.SecurityGroupNames != nil { + in, out := &in.SecurityGroupNames, &out.SecurityGroupNames + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SnapshotArns != nil { + in, out := &in.SnapshotArns, &out.SnapshotArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SnapshotName != nil { + in, out := &in.SnapshotName, &out.SnapshotName + *out = new(string) + **out = **in + } + if in.SnapshotRetentionLimit != nil { + in, out := &in.SnapshotRetentionLimit, &out.SnapshotRetentionLimit + *out = new(float64) + **out = **in + } + if in.SnapshotWindow != nil { + in, out := &in.SnapshotWindow, &out.SnapshotWindow + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TransitEncryptionEnabled != nil { + in, out := &in.TransitEncryptionEnabled, &out.TransitEncryptionEnabled + *out = new(bool) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterParameters. -func (in *ParameterParameters) DeepCopy() *ParameterParameters { - if in == nil { - return nil + if in.UserGroupIds != nil { + in, out := &in.UserGroupIds, &out.UserGroupIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - out := new(ParameterParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationGroup) DeepCopyInto(out *ReplicationGroup) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationGroup. -func (in *ReplicationGroup) DeepCopy() *ReplicationGroup { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationGroupInitParameters. +func (in *ReplicationGroupInitParameters) DeepCopy() *ReplicationGroupInitParameters { if in == nil { return nil } - out := new(ReplicationGroup) + out := new(ReplicationGroupInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicationGroup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicationGroupList) DeepCopyInto(out *ReplicationGroupList) { *out = *in @@ -1074,6 +1663,41 @@ func (in *ReplicationGroupList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicationGroupLogDeliveryConfigurationInitParameters) DeepCopyInto(out *ReplicationGroupLogDeliveryConfigurationInitParameters) { + *out = *in + if in.Destination != nil { + in, out := &in.Destination, &out.Destination + *out = new(string) + **out = **in + } + if in.DestinationType != nil { + in, out := &in.DestinationType, &out.DestinationType + *out = new(string) + **out = **in + } + if in.LogFormat != nil { + in, out := &in.LogFormat, &out.LogFormat + *out = new(string) + **out = **in + } + if in.LogType != nil { + in, out := &in.LogType, &out.LogType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationGroupLogDeliveryConfigurationInitParameters. +func (in *ReplicationGroupLogDeliveryConfigurationInitParameters) DeepCopy() *ReplicationGroupLogDeliveryConfigurationInitParameters { + if in == nil { + return nil + } + out := new(ReplicationGroupLogDeliveryConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicationGroupLogDeliveryConfigurationObservation) DeepCopyInto(out *ReplicationGroupLogDeliveryConfigurationObservation) { *out = *in @@ -1372,7 +1996,8 @@ func (in *ReplicationGroupObservation) DeepCopyInto(out *ReplicationGroupObserva if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1387,7 +2012,8 @@ func (in *ReplicationGroupObservation) DeepCopyInto(out *ReplicationGroupObserva if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1563,6 +2189,18 @@ func (in *ReplicationGroupParameters) DeepCopyInto(out *ReplicationGroupParamete *out = new(float64) **out = **in } + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecurityGroupIds != nil { in, out := &in.SecurityGroupIds, &out.SecurityGroupIds *out = make([]*string, len(*in)) @@ -1634,7 +2272,8 @@ func (in *ReplicationGroupParameters) DeepCopyInto(out *ReplicationGroupParamete if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1649,7 +2288,8 @@ func (in *ReplicationGroupParameters) DeepCopyInto(out *ReplicationGroupParamete if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1689,6 +2329,7 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationGroupSpec. @@ -1745,6 +2386,58 @@ func (in *SubnetGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetGroupInitParameters) DeepCopyInto(out *SubnetGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupInitParameters. +func (in *SubnetGroupInitParameters) DeepCopy() *SubnetGroupInitParameters { + if in == nil { + return nil + } + out := new(SubnetGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SubnetGroupList) DeepCopyInto(out *SubnetGroupList) { *out = *in @@ -1814,7 +2507,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1829,7 +2523,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1861,6 +2556,18 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { *out = new(string) **out = **in } + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubnetIds != nil { in, out := &in.SubnetIds, &out.SubnetIds *out = make([]*string, len(*in)) @@ -1880,7 +2587,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1895,7 +2603,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1919,6 +2628,7 @@ func (in *SubnetGroupSpec) DeepCopyInto(out *SubnetGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupSpec. @@ -2002,6 +2712,58 @@ func (in *UserGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserGroupInitParameters) DeepCopyInto(out *UserGroupInitParameters) { + *out = *in + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserGroupInitParameters. +func (in *UserGroupInitParameters) DeepCopy() *UserGroupInitParameters { + if in == nil { + return nil + } + out := new(UserGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UserGroupList) DeepCopyInto(out *UserGroupList) { *out = *in @@ -2060,7 +2822,8 @@ func (in *UserGroupObservation) DeepCopyInto(out *UserGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2075,7 +2838,8 @@ func (in *UserGroupObservation) DeepCopyInto(out *UserGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2126,7 +2890,8 @@ func (in *UserGroupParameters) DeepCopyInto(out *UserGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2141,7 +2906,8 @@ func (in *UserGroupParameters) DeepCopyInto(out *UserGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2188,6 +2954,7 @@ func (in *UserGroupSpec) DeepCopyInto(out *UserGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserGroupSpec. @@ -2217,6 +2984,80 @@ func (in *UserGroupStatus) DeepCopy() *UserGroupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserInitParameters) DeepCopyInto(out *UserInitParameters) { + *out = *in + if in.AccessString != nil { + in, out := &in.AccessString, &out.AccessString + *out = new(string) + **out = **in + } + if in.AuthenticationMode != nil { + in, out := &in.AuthenticationMode, &out.AuthenticationMode + *out = make([]AuthenticationModeInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.NoPasswordRequired != nil { + in, out := &in.NoPasswordRequired, &out.NoPasswordRequired + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.UserName != nil { + in, out := &in.UserName, &out.UserName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInitParameters. +func (in *UserInitParameters) DeepCopy() *UserInitParameters { + if in == nil { + return nil + } + out := new(UserInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UserList) DeepCopyInto(out *UserList) { *out = *in @@ -2292,7 +3133,8 @@ func (in *UserObservation) DeepCopyInto(out *UserObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2307,7 +3149,8 @@ func (in *UserObservation) DeepCopyInto(out *UserObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2378,7 +3221,8 @@ func (in *UserParameters) DeepCopyInto(out *UserParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2393,7 +3237,8 @@ func (in *UserParameters) DeepCopyInto(out *UserParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2422,6 +3267,7 @@ func (in *UserSpec) DeepCopyInto(out *UserSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec. diff --git a/apis/elasticache/v1alpha1/zz_generated.managed.go b/apis/elasticache/v1alpha1/zz_generated.managed.go index 8003b9d..728824f 100644 --- a/apis/elasticache/v1alpha1/zz_generated.managed.go +++ b/apis/elasticache/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Cluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Cluster. -func (mg *Cluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Cluster. +func (mg *Cluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Cluster. @@ -27,14 +27,6 @@ func (mg *Cluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Cluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Cluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Cluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Cluster. -func (mg *Cluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Cluster. +func (mg *Cluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Cluster. @@ -65,14 +57,6 @@ func (mg *Cluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Cluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Cluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *ParameterGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ParameterGroup. @@ -103,14 +87,6 @@ func (mg *ParameterGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ParameterGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ParameterGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *ParameterGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ParameterGroup. @@ -141,14 +117,6 @@ func (mg *ParameterGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ParameterGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ParameterGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *ReplicationGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ReplicationGroup. -func (mg *ReplicationGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ReplicationGroup. +func (mg *ReplicationGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ReplicationGroup. @@ -179,14 +147,6 @@ func (mg *ReplicationGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ReplicationGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ReplicationGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ReplicationGroup. func (mg *ReplicationGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *ReplicationGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ReplicationGroup. -func (mg *ReplicationGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ReplicationGroup. +func (mg *ReplicationGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ReplicationGroup. @@ -217,14 +177,6 @@ func (mg *ReplicationGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ReplicationGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ReplicationGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ReplicationGroup. func (mg *ReplicationGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -245,9 +197,9 @@ func (mg *SubnetGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this SubnetGroup. @@ -255,14 +207,6 @@ func (mg *SubnetGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this SubnetGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *SubnetGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -283,9 +227,9 @@ func (mg *SubnetGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this SubnetGroup. @@ -293,14 +237,6 @@ func (mg *SubnetGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this SubnetGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *SubnetGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -321,9 +257,9 @@ func (mg *User) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this User. -func (mg *User) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this User. +func (mg *User) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this User. @@ -331,14 +267,6 @@ func (mg *User) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this User. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *User) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this User. func (mg *User) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -359,9 +287,9 @@ func (mg *User) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this User. -func (mg *User) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this User. +func (mg *User) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this User. @@ -369,14 +297,6 @@ func (mg *User) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this User. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *User) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this User. func (mg *User) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -397,9 +317,9 @@ func (mg *UserGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this UserGroup. -func (mg *UserGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this UserGroup. +func (mg *UserGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this UserGroup. @@ -407,14 +327,6 @@ func (mg *UserGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this UserGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *UserGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this UserGroup. func (mg *UserGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -435,9 +347,9 @@ func (mg *UserGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this UserGroup. -func (mg *UserGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this UserGroup. +func (mg *UserGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this UserGroup. @@ -445,14 +357,6 @@ func (mg *UserGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this UserGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *UserGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this UserGroup. func (mg *UserGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/elasticache/v1alpha1/zz_generated.resolvers.go b/apis/elasticache/v1alpha1/zz_generated.resolvers.go index 4700fd0..067aad4 100644 --- a/apis/elasticache/v1alpha1/zz_generated.resolvers.go +++ b/apis/elasticache/v1alpha1/zz_generated.resolvers.go @@ -8,8 +8,10 @@ package v1alpha1 import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - v1beta1 "github.com/upbound/provider-aws/apis/kms/v1beta1" + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + v1alpha11 "kubedb.dev/provider-aws/apis/kms/v1alpha1" client "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -18,6 +20,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -36,6 +39,54 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ParameterGroupNameRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ReplicationGroupID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.ReplicationGroupIDRef, + Selector: mg.Spec.ForProvider.ReplicationGroupIDSelector, + To: reference.To{ + List: &ReplicationGroupList{}, + Managed: &ReplicationGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ReplicationGroupID") + } + mg.Spec.ForProvider.ReplicationGroupID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ReplicationGroupIDRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.SecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha1.SecurityGroupList{}, + Managed: &v1alpha1.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SecurityGroupIds") + } + mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetGroupName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.SubnetGroupNameRef, + Selector: mg.Spec.ForProvider.SubnetGroupNameSelector, + To: reference.To{ + List: &SubnetGroupList{}, + Managed: &SubnetGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetGroupName") + } + mg.Spec.ForProvider.SubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SubnetGroupNameRef = rsp.ResolvedReference + return nil } @@ -44,6 +95,7 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,8 +104,8 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read Reference: mg.Spec.ForProvider.KMSKeyIDRef, Selector: mg.Spec.ForProvider.KMSKeyIDSelector, To: reference.To{ - List: &v1beta1.KeyList{}, - Managed: &v1beta1.Key{}, + List: &v1alpha11.KeyList{}, + Managed: &v1alpha11.Key{}, }, }) if err != nil { @@ -62,6 +114,22 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.SecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha1.SecurityGroupList{}, + Managed: &v1alpha1.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SecurityGroupIds") + } + mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetGroupName), Extract: reference.ExternalName(), @@ -81,6 +149,32 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read return nil } +// ResolveReferences of this SubnetGroup. +func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var mrsp reference.MultiResolutionResponse + var err error + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SubnetIDRefs, + Selector: mg.Spec.ForProvider.SubnetIDSelector, + To: reference.To{ + List: &v1alpha1.SubnetList{}, + Managed: &v1alpha1.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetIds") + } + mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences + + return nil +} + // ResolveReferences of this UserGroup. func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) diff --git a/apis/elasticache/v1alpha1/zz_generated_terraformed.go b/apis/elasticache/v1alpha1/zz_generated_terraformed.go index e96ddef..bb1222f 100755 --- a/apis/elasticache/v1alpha1/zz_generated_terraformed.go +++ b/apis/elasticache/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Cluster @@ -69,6 +74,46 @@ func (tr *Cluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Cluster +func (tr *Cluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Cluster +func (tr *Cluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Cluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Cluster) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *ParameterGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ParameterGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ParameterGroup) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *ReplicationGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ReplicationGroup +func (tr *ReplicationGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ReplicationGroup +func (tr *ReplicationGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ReplicationGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ReplicationGroup) LateInitialize(attrs []byte) (bool, error) { @@ -294,6 +419,46 @@ func (tr *SubnetGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetGroup) LateInitialize(attrs []byte) (bool, error) { @@ -368,6 +533,46 @@ func (tr *User) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this User +func (tr *User) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this User +func (tr *User) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this User using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *User) LateInitialize(attrs []byte) (bool, error) { @@ -442,6 +647,46 @@ func (tr *UserGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this UserGroup +func (tr *UserGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this UserGroup +func (tr *UserGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this UserGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *UserGroup) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/elasticache/v1alpha1/zz_groupversion_info.go b/apis/elasticache/v1alpha1/zz_groupversion_info.go index fb5106e..9c30af5 100755 --- a/apis/elasticache/v1alpha1/zz_groupversion_info.go +++ b/apis/elasticache/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/elasticache/v1alpha1/zz_parametergroup_types.go b/apis/elasticache/v1alpha1/zz_parametergroup_types.go index 1cdbc9a..17a5545 100755 --- a/apis/elasticache/v1alpha1/zz_parametergroup_types.go +++ b/apis/elasticache/v1alpha1/zz_parametergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,27 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ParameterGroupInitParameters struct { + + // The description of the ElastiCache parameter group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The family of the ElastiCache parameter group. + Family *string `json:"family,omitempty" tf:"family,omitempty"` + + // The name of the ElastiCache parameter group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // A list of ElastiCache parameters to apply. + Parameter []ParameterInitParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` + + // Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ParameterGroupObservation struct { // The AWS ARN associated with the parameter group. @@ -72,6 +97,15 @@ type ParameterGroupParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ParameterInitParameters struct { + + // The name of the ElastiCache parameter group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The value of the ElastiCache parameter. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type ParameterObservation struct { // The name of the ElastiCache parameter group. @@ -84,11 +118,11 @@ type ParameterObservation struct { type ParameterParameters struct { // The name of the ElastiCache parameter group. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The value of the ElastiCache parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -96,6 +130,17 @@ type ParameterParameters struct { type ParameterGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ParameterGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ParameterGroupInitParameters `json:"initProvider,omitempty"` } // ParameterGroupStatus defines the observed state of ParameterGroup. @@ -116,9 +161,9 @@ type ParameterGroupStatus struct { type ParameterGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family)",message="family is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ParameterGroupSpec `json:"spec"` Status ParameterGroupStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_replicationgroup_types.go b/apis/elasticache/v1alpha1/zz_replicationgroup_types.go index 15de8bf..da27716 100755 --- a/apis/elasticache/v1alpha1/zz_replicationgroup_types.go +++ b/apis/elasticache/v1alpha1/zz_replicationgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,123 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ReplicationGroupInitParameters struct { + + // Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is false. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // Whether to enable encryption at rest. + AtRestEncryptionEnabled *bool `json:"atRestEncryptionEnabled,omitempty" tf:"at_rest_encryption_enabled,omitempty"` + + // Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. + // Only supported for engine type "redis" and if the engine version is 6 or higher. + // Defaults to true. + AutoMinorVersionUpgrade *string `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, num_cache_clusters must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to false. + AutomaticFailoverEnabled *bool `json:"automaticFailoverEnabled,omitempty" tf:"automatic_failover_enabled,omitempty"` + + // Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes. + DataTieringEnabled *bool `json:"dataTieringEnabled,omitempty" tf:"data_tiering_enabled,omitempty"` + + // created description for the replication group. Must not be empty. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Name of the cache engine to be used for the clusters in this replication group. The only valid value is redis. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Version number of the cache engine to be used for the cache clusters in this replication group. + // If the version is 6 or higher, the major and minor version can be set, e.g., 6.2, + // or the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x. + // Otherwise, specify the full version desired, e.g., 5.0.6. + // The actual engine version used is returned in the attribute engine_version_actual, see Attributes Reference below. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. + FinalSnapshotIdentifier *string `json:"finalSnapshotIdentifier,omitempty" tf:"final_snapshot_identifier,omitempty"` + + // The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If global_replication_group_id is set, the num_node_groups parameter cannot be set. + GlobalReplicationGroupID *string `json:"globalReplicationGroupId,omitempty" tf:"global_replication_group_id,omitempty"` + + // Specifies the destination and format of Redis SLOWLOG or Redis Engine Log. See the documentation on Amazon ElastiCache. See Log Delivery Configuration below for more details. + LogDeliveryConfiguration []ReplicationGroupLogDeliveryConfigurationInitParameters `json:"logDeliveryConfiguration,omitempty" tf:"log_delivery_configuration,omitempty"` + + // ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: sun:05:00-sun:09:00 + MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + + // Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic_failover_enabled must also be enabled. Defaults to false. + MultiAzEnabled *bool `json:"multiAzEnabled,omitempty" tf:"multi_az_enabled,omitempty"` + + // Instance class to be used. See AWS documentation for information on supported node types and guidance on selecting node types. Required unless global_replication_group_id is set. Cannot be set if global_replication_group_id is set. + NodeType *string `json:"nodeType,omitempty" tf:"node_type,omitempty"` + + // east-1:012345678999:my_sns_topic + NotificationTopicArn *string `json:"notificationTopicArn,omitempty" tf:"notification_topic_arn,omitempty"` + + // 00#. + NumCacheClusters *float64 `json:"numCacheClusters,omitempty" tf:"num_cache_clusters,omitempty"` + + // Number of node groups (shards) for this Redis replication group. + // Changing this number will trigger a resizing operation before other settings modifications. + NumNodeGroups *float64 `json:"numNodeGroups,omitempty" tf:"num_node_groups,omitempty"` + + // Name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. To enable "cluster mode", i.e., data sharding, use a parameter group that has the parameter cluster-enabled set to true. + ParameterGroupName *string `json:"parameterGroupName,omitempty" tf:"parameter_group_name,omitempty"` + + // – Port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // List of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is considered. The first item in the list will be the primary node. Ignored when updating. + PreferredCacheClusterAzs []*string `json:"preferredCacheClusterAzs,omitempty" tf:"preferred_cache_cluster_azs,omitempty"` + + // Number of replica nodes in each node group. + // Changing this number will trigger a resizing operation before other settings modifications. + // Valid values are 0 to 5. + ReplicasPerNodeGroup *float64 `json:"replicasPerNodeGroup,omitempty" tf:"replicas_per_node_group,omitempty"` + + // List of cache security group names to associate with this replication group. + SecurityGroupNames []*string `json:"securityGroupNames,omitempty" tf:"security_group_names,omitempty"` + + // – List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas. + SnapshotArns []*string `json:"snapshotArns,omitempty" tf:"snapshot_arns,omitempty"` + + // Name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource. + SnapshotName *string `json:"snapshotName,omitempty" tf:"snapshot_name,omitempty"` + + // Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of snapshot_retention_limit is set to zero (0), backups are turned off. Please note that setting a snapshot_retention_limit is not supported on cache.t1.micro cache nodes + SnapshotRetentionLimit *float64 `json:"snapshotRetentionLimit,omitempty" tf:"snapshot_retention_limit,omitempty"` + + // Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. Example: 05:00-09:00 + SnapshotWindow *string `json:"snapshotWindow,omitempty" tf:"snapshot_window,omitempty"` + + // Map of tags to assign to the resource. Adding tags to this resource will add or overwrite any existing tags on the clusters in the replication group and not to the group itself. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Whether to enable encryption in transit. + TransitEncryptionEnabled *bool `json:"transitEncryptionEnabled,omitempty" tf:"transit_encryption_enabled,omitempty"` + + // User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. NOTE: This argument is a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one. + UserGroupIds []*string `json:"userGroupIds,omitempty" tf:"user_group_ids,omitempty"` +} + +type ReplicationGroupLogDeliveryConfigurationInitParameters struct { + + // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. + Destination *string `json:"destination,omitempty" tf:"destination,omitempty"` + + // For CloudWatch Logs use cloudwatch-logs or for Kinesis Data Firehose use kinesis-firehose. + DestinationType *string `json:"destinationType,omitempty" tf:"destination_type,omitempty"` + + // Valid values are json or text + LogFormat *string `json:"logFormat,omitempty" tf:"log_format,omitempty"` + + // Valid values are slow-log or engine-log. Max 1 of each. + LogType *string `json:"logType,omitempty" tf:"log_type,omitempty"` +} + type ReplicationGroupLogDeliveryConfigurationObservation struct { // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. @@ -31,19 +152,19 @@ type ReplicationGroupLogDeliveryConfigurationObservation struct { type ReplicationGroupLogDeliveryConfigurationParameters struct { // Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Destination *string `json:"destination" tf:"destination,omitempty"` // For CloudWatch Logs use cloudwatch-logs or for Kinesis Data Firehose use kinesis-firehose. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional DestinationType *string `json:"destinationType" tf:"destination_type,omitempty"` // Valid values are json or text - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional LogFormat *string `json:"logFormat" tf:"log_format,omitempty"` // Valid values are slow-log or engine-log. Max 1 of each. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional LogType *string `json:"logType" tf:"log_type,omitempty"` } @@ -235,7 +356,7 @@ type ReplicationGroupParameters struct { GlobalReplicationGroupID *string `json:"globalReplicationGroupId,omitempty" tf:"global_replication_group_id,omitempty"` // The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if at_rest_encryption_enabled = true. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` @@ -299,7 +420,18 @@ type ReplicationGroupParameters struct { // +kubebuilder:validation:Optional ReplicasPerNodeGroup *float64 `json:"replicasPerNodeGroup,omitempty" tf:"replicas_per_node_group,omitempty"` + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // One or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector // +kubebuilder:validation:Optional SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` @@ -357,6 +489,17 @@ type ReplicationGroupParameters struct { type ReplicationGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ReplicationGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ReplicationGroupInitParameters `json:"initProvider,omitempty"` } // ReplicationGroupStatus defines the observed state of ReplicationGroup. @@ -377,7 +520,7 @@ type ReplicationGroupStatus struct { type ReplicationGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ReplicationGroupSpec `json:"spec"` Status ReplicationGroupStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_subnetgroup_types.go b/apis/elasticache/v1alpha1/zz_subnetgroup_types.go index 94c1978..ea2d02e 100755 --- a/apis/elasticache/v1alpha1/zz_subnetgroup_types.go +++ b/apis/elasticache/v1alpha1/zz_subnetgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SubnetGroupInitParameters struct { + + // – Description for the cache subnet group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SubnetGroupObservation struct { Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` @@ -42,7 +58,18 @@ type SubnetGroupParameters struct { // +kubebuilder:validation:Optional Region *string `json:"region,omitempty" tf:"-"` + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + // – List of VPC Subnet IDs for the cache subnet group + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector // +kubebuilder:validation:Optional SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` @@ -59,6 +86,17 @@ type SubnetGroupParameters struct { type SubnetGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SubnetGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SubnetGroupInitParameters `json:"initProvider,omitempty"` } // SubnetGroupStatus defines the observed state of SubnetGroup. @@ -79,8 +117,7 @@ type SubnetGroupStatus struct { type SubnetGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds)",message="subnetIds is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SubnetGroupSpec `json:"spec"` Status SubnetGroupStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_user_types.go b/apis/elasticache/v1alpha1/zz_user_types.go index f6d6dfd..a1631d3 100755 --- a/apis/elasticache/v1alpha1/zz_user_types.go +++ b/apis/elasticache/v1alpha1/zz_user_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AuthenticationModeInitParameters struct { + + // Specifies the authentication type. Possible options are: password, no-password-required or iam. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + type AuthenticationModeObservation struct { PasswordCount *float64 `json:"passwordCount,omitempty" tf:"password_count,omitempty"` @@ -27,10 +37,33 @@ type AuthenticationModeParameters struct { PasswordsSecretRef *[]v1.SecretKeySelector `json:"passwordsSecretRef,omitempty" tf:"-"` // Specifies the authentication type. Possible options are: password, no-password-required or iam. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Type *string `json:"type" tf:"type,omitempty"` } +type UserInitParameters struct { + + // Access permissions string used for this user. See Specifying Permissions Using an Access String for more details. + AccessString *string `json:"accessString,omitempty" tf:"access_string,omitempty"` + + // Denotes the user's authentication properties. Detailed below. + AuthenticationMode []AuthenticationModeInitParameters `json:"authenticationMode,omitempty" tf:"authentication_mode,omitempty"` + + // The current supported value is REDIS. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Indicates a password is not required for this user. + NoPasswordRequired *bool `json:"noPasswordRequired,omitempty" tf:"no_password_required,omitempty"` + + // A list of tags to be added to this resource. A tag is a key-value pair. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The username of the user. + UserName *string `json:"userName,omitempty" tf:"user_name,omitempty"` +} + type UserObservation struct { // Access permissions string used for this user. See Specifying Permissions Using an Access String for more details. @@ -102,6 +135,17 @@ type UserParameters struct { type UserSpec struct { v1.ResourceSpec `json:",inline"` 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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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"` } // UserStatus defines the observed state of User. @@ -122,10 +166,10 @@ type UserStatus struct { type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.accessString)",message="accessString is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine)",message="engine is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.userName)",message="userName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accessString) || (has(self.initProvider) && has(self.initProvider.accessString))",message="spec.forProvider.accessString is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engine) || (has(self.initProvider) && has(self.initProvider.engine))",message="spec.forProvider.engine is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.userName) || (has(self.initProvider) && has(self.initProvider.userName))",message="spec.forProvider.userName is a required parameter" Spec UserSpec `json:"spec"` Status UserStatus `json:"status,omitempty"` } diff --git a/apis/elasticache/v1alpha1/zz_usergroup_types.go b/apis/elasticache/v1alpha1/zz_usergroup_types.go index c1f7900..5e0f9f4 100755 --- a/apis/elasticache/v1alpha1/zz_usergroup_types.go +++ b/apis/elasticache/v1alpha1/zz_usergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type UserGroupInitParameters struct { + + // The current supported value is REDIS. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type UserGroupObservation struct { // The ARN that identifies the user group. @@ -73,6 +89,17 @@ type UserGroupParameters struct { type UserGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider UserGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 UserGroupInitParameters `json:"initProvider,omitempty"` } // UserGroupStatus defines the observed state of UserGroup. @@ -93,8 +120,8 @@ type UserGroupStatus struct { type UserGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine)",message="engine is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engine) || (has(self.initProvider) && has(self.initProvider.engine))",message="spec.forProvider.engine is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec UserGroupSpec `json:"spec"` Status UserGroupStatus `json:"status,omitempty"` } diff --git a/apis/elasticsearch/v1alpha1/zz_domain_types.go b/apis/elasticsearch/v1alpha1/zz_domain_types.go index b5b6305..41eac60 100755 --- a/apis/elasticsearch/v1alpha1/zz_domain_types.go +++ b/apis/elasticsearch/v1alpha1/zz_domain_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AdvancedSecurityOptionsInitParameters struct { + + // Whether advanced security is enabled. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Whether the internal user database is enabled. If not set, defaults to false by the AWS API. + InternalUserDatabaseEnabled *bool `json:"internalUserDatabaseEnabled,omitempty" tf:"internal_user_database_enabled,omitempty"` + + // Configuration block for the main user. Detailed below. + MasterUserOptions []MasterUserOptionsInitParameters `json:"masterUserOptions,omitempty" tf:"master_user_options,omitempty"` +} + type AdvancedSecurityOptionsObservation struct { // Whether advanced security is enabled. @@ -28,7 +44,7 @@ type AdvancedSecurityOptionsObservation struct { type AdvancedSecurityOptionsParameters struct { // Whether advanced security is enabled. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // Whether the internal user database is enabled. If not set, defaults to false by the AWS API. @@ -40,6 +56,18 @@ type AdvancedSecurityOptionsParameters struct { MasterUserOptions []MasterUserOptionsParameters `json:"masterUserOptions,omitempty" tf:"master_user_options,omitempty"` } +type AutoTuneOptionsInitParameters struct { + + // The Auto-Tune desired state for the domain. Valid values: ENABLED or DISABLED. + DesiredState *string `json:"desiredState,omitempty" tf:"desired_state,omitempty"` + + // Configuration block for Auto-Tune maintenance windows. Can be specified multiple times for each maintenance window. Detailed below. + MaintenanceSchedule []MaintenanceScheduleInitParameters `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` + + // Whether to roll back to default Auto-Tune settings when disabling Auto-Tune. Valid values: DEFAULT_ROLLBACK or NO_ROLLBACK. + RollbackOnDisable *string `json:"rollbackOnDisable,omitempty" tf:"rollback_on_disable,omitempty"` +} + type AutoTuneOptionsObservation struct { // The Auto-Tune desired state for the domain. Valid values: ENABLED or DISABLED. @@ -55,7 +83,7 @@ type AutoTuneOptionsObservation struct { type AutoTuneOptionsParameters struct { // The Auto-Tune desired state for the domain. Valid values: ENABLED or DISABLED. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional DesiredState *string `json:"desiredState" tf:"desired_state,omitempty"` // Configuration block for Auto-Tune maintenance windows. Can be specified multiple times for each maintenance window. Detailed below. @@ -67,6 +95,42 @@ type AutoTuneOptionsParameters struct { RollbackOnDisable *string `json:"rollbackOnDisable,omitempty" tf:"rollback_on_disable,omitempty"` } +type ClusterConfigInitParameters struct { + + // Configuration block containing cold storage configuration. Detailed below. + ColdStorageOptions []ColdStorageOptionsInitParameters `json:"coldStorageOptions,omitempty" tf:"cold_storage_options,omitempty"` + + // Number of dedicated main nodes in the cluster. + DedicatedMasterCount *float64 `json:"dedicatedMasterCount,omitempty" tf:"dedicated_master_count,omitempty"` + + // Whether dedicated main nodes are enabled for the cluster. + DedicatedMasterEnabled *bool `json:"dedicatedMasterEnabled,omitempty" tf:"dedicated_master_enabled,omitempty"` + + // Instance type of the dedicated main nodes in the cluster. + DedicatedMasterType *string `json:"dedicatedMasterType,omitempty" tf:"dedicated_master_type,omitempty"` + + // Number of instances in the cluster. + InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` + + // Instance type of data nodes in the cluster. + InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + + // Number of warm nodes in the cluster. Valid values are between 2 and 150. warm_count can be only and must be set when warm_enabled is set to true. + WarmCount *float64 `json:"warmCount,omitempty" tf:"warm_count,omitempty"` + + // Whether to enable warm storage. + WarmEnabled *bool `json:"warmEnabled,omitempty" tf:"warm_enabled,omitempty"` + + // Instance type for the Elasticsearch cluster's warm nodes. Valid values are ultrawarm1.medium.elasticsearch, ultrawarm1.large.elasticsearch and ultrawarm1.xlarge.elasticsearch. warm_type can be only and must be set when warm_enabled is set to true. + WarmType *string `json:"warmType,omitempty" tf:"warm_type,omitempty"` + + // Configuration block containing zone awareness settings. Detailed below. + ZoneAwarenessConfig []ZoneAwarenessConfigInitParameters `json:"zoneAwarenessConfig,omitempty" tf:"zone_awareness_config,omitempty"` + + // Whether zone awareness is enabled, set to true for multi-az deployment. To enable awareness with three Availability Zones, the availability_zone_count within the zone_awareness_config must be set to 3. + ZoneAwarenessEnabled *bool `json:"zoneAwarenessEnabled,omitempty" tf:"zone_awareness_enabled,omitempty"` +} + type ClusterConfigObservation struct { // Configuration block containing cold storage configuration. Detailed below. @@ -150,6 +214,21 @@ type ClusterConfigParameters struct { ZoneAwarenessEnabled *bool `json:"zoneAwarenessEnabled,omitempty" tf:"zone_awareness_enabled,omitempty"` } +type CognitoOptionsInitParameters struct { + + // Whether Amazon Cognito authentication with Kibana is enabled or not. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // ID of the Cognito Identity Pool to use. + IdentityPoolID *string `json:"identityPoolId,omitempty" tf:"identity_pool_id,omitempty"` + + // ARN of the IAM role that has the AmazonESCognitoAccess policy attached. + RoleArn *string `json:"roleArn,omitempty" tf:"role_arn,omitempty"` + + // ID of the Cognito User Pool to use. + UserPoolID *string `json:"userPoolId,omitempty" tf:"user_pool_id,omitempty"` +} + type CognitoOptionsObservation struct { // Whether Amazon Cognito authentication with Kibana is enabled or not. @@ -172,18 +251,24 @@ type CognitoOptionsParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` // ID of the Cognito Identity Pool to use. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional IdentityPoolID *string `json:"identityPoolId" tf:"identity_pool_id,omitempty"` // ARN of the IAM role that has the AmazonESCognitoAccess policy attached. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional RoleArn *string `json:"roleArn" tf:"role_arn,omitempty"` // ID of the Cognito User Pool to use. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional UserPoolID *string `json:"userPoolId" tf:"user_pool_id,omitempty"` } +type ColdStorageOptionsInitParameters struct { + + // Boolean to enable cold storage for an Elasticsearch domain. Defaults to false. Master and ultrawarm nodes must be enabled for cold storage. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type ColdStorageOptionsObservation struct { // Boolean to enable cold storage for an Elasticsearch domain. Defaults to false. Master and ultrawarm nodes must be enabled for cold storage. @@ -197,6 +282,24 @@ type ColdStorageOptionsParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } +type DomainEndpointOptionsInitParameters struct { + + // Fully qualified domain for your custom endpoint. + CustomEndpoint *string `json:"customEndpoint,omitempty" tf:"custom_endpoint,omitempty"` + + // ACM certificate ARN for your custom endpoint. + CustomEndpointCertificateArn *string `json:"customEndpointCertificateArn,omitempty" tf:"custom_endpoint_certificate_arn,omitempty"` + + // Whether to enable custom endpoint for the Elasticsearch domain. + CustomEndpointEnabled *bool `json:"customEndpointEnabled,omitempty" tf:"custom_endpoint_enabled,omitempty"` + + // Whether or not to require HTTPS. Defaults to true. + EnforceHTTPS *bool `json:"enforceHttps,omitempty" tf:"enforce_https,omitempty"` + + // Name of the TLS security policy that needs to be applied to the HTTPS endpoint. Valid values: Policy-Min-TLS-1-0-2019-07 and Policy-Min-TLS-1-2-2019-07. + TLSSecurityPolicy *string `json:"tlsSecurityPolicy,omitempty" tf:"tls_security_policy,omitempty"` +} + type DomainEndpointOptionsObservation struct { // Fully qualified domain for your custom endpoint. @@ -238,6 +341,57 @@ type DomainEndpointOptionsParameters struct { TLSSecurityPolicy *string `json:"tlsSecurityPolicy,omitempty" tf:"tls_security_policy,omitempty"` } +type DomainInitParameters struct { + + // IAM policy document specifying the access policies for the domain. + AccessPolicies *string `json:"accessPolicies,omitempty" tf:"access_policies,omitempty"` + + // Key-value string pairs to specify advanced configuration options. + AdvancedOptions map[string]*string `json:"advancedOptions,omitempty" tf:"advanced_options,omitempty"` + + // Configuration block for fine-grained access control. Detailed below. + AdvancedSecurityOptions []AdvancedSecurityOptionsInitParameters `json:"advancedSecurityOptions,omitempty" tf:"advanced_security_options,omitempty"` + + // Configuration block for the Auto-Tune options of the domain. Detailed below. + AutoTuneOptions []AutoTuneOptionsInitParameters `json:"autoTuneOptions,omitempty" tf:"auto_tune_options,omitempty"` + + // Configuration block for the cluster of the domain. Detailed below. + ClusterConfig []ClusterConfigInitParameters `json:"clusterConfig,omitempty" tf:"cluster_config,omitempty"` + + // Configuration block for authenticating Kibana with Cognito. Detailed below. + CognitoOptions []CognitoOptionsInitParameters `json:"cognitoOptions,omitempty" tf:"cognito_options,omitempty"` + + // Configuration block for domain endpoint HTTP(S) related options. Detailed below. + DomainEndpointOptions []DomainEndpointOptionsInitParameters `json:"domainEndpointOptions,omitempty" tf:"domain_endpoint_options,omitempty"` + + // Configuration block for EBS related options, may be required based on chosen instance size. Detailed below. + EBSOptions []EBSOptionsInitParameters `json:"ebsOptions,omitempty" tf:"ebs_options,omitempty"` + + // Version of Elasticsearch to deploy. Defaults to 1.5. + ElasticsearchVersion *string `json:"elasticsearchVersion,omitempty" tf:"elasticsearch_version,omitempty"` + + // Configuration block for encrypt at rest options. Only available for certain instance types. Detailed below. + EncryptAtRest []EncryptAtRestInitParameters `json:"encryptAtRest,omitempty" tf:"encrypt_at_rest,omitempty"` + + // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. + LogPublishingOptions []LogPublishingOptionsInitParameters `json:"logPublishingOptions,omitempty" tf:"log_publishing_options,omitempty"` + + // Configuration block for node-to-node encryption options. Detailed below. + NodeToNodeEncryption []NodeToNodeEncryptionInitParameters `json:"nodeToNodeEncryption,omitempty" tf:"node_to_node_encryption,omitempty"` + + // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. + SnapshotOptions []SnapshotOptionsInitParameters `json:"snapshotOptions,omitempty" tf:"snapshot_options,omitempty"` + + // Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Configuration block for VPC related options. Adding or removing this configuration forces a new resource (documentation). Detailed below. + VPCOptions []VPCOptionsInitParameters `json:"vpcOptions,omitempty" tf:"vpc_options,omitempty"` +} + type DomainObservation struct { // IAM policy document specifying the access policies for the domain. @@ -375,6 +529,15 @@ type DomainParameters struct { VPCOptions []VPCOptionsParameters `json:"vpcOptions,omitempty" tf:"vpc_options,omitempty"` } +type DurationInitParameters struct { + + // The unit of time specifying the duration of an Auto-Tune maintenance window. Valid values: HOURS. + Unit *string `json:"unit,omitempty" tf:"unit,omitempty"` + + // An integer specifying the value of the duration of an Auto-Tune maintenance window. + Value *float64 `json:"value,omitempty" tf:"value,omitempty"` +} + type DurationObservation struct { // The unit of time specifying the duration of an Auto-Tune maintenance window. Valid values: HOURS. @@ -387,14 +550,32 @@ type DurationObservation struct { type DurationParameters struct { // The unit of time specifying the duration of an Auto-Tune maintenance window. Valid values: HOURS. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Unit *string `json:"unit" tf:"unit,omitempty"` // An integer specifying the value of the duration of an Auto-Tune maintenance window. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *float64 `json:"value" tf:"value,omitempty"` } +type EBSOptionsInitParameters struct { + + // Whether EBS volumes are attached to data nodes in the domain. + EBSEnabled *bool `json:"ebsEnabled,omitempty" tf:"ebs_enabled,omitempty"` + + // Baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the GP3 and Provisioned IOPS EBS volume types. + Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` + + // Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the gp3 volume type. + Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` + + // Size of EBS volumes attached to data nodes (in GiB). + VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"` + + // Type of EBS volumes attached to data nodes. + VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"` +} + type EBSOptionsObservation struct { // Whether EBS volumes are attached to data nodes in the domain. @@ -416,7 +597,7 @@ type EBSOptionsObservation struct { type EBSOptionsParameters struct { // Whether EBS volumes are attached to data nodes in the domain. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional EBSEnabled *bool `json:"ebsEnabled" tf:"ebs_enabled,omitempty"` // Baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the GP3 and Provisioned IOPS EBS volume types. @@ -436,6 +617,15 @@ type EBSOptionsParameters struct { VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"` } +type EncryptAtRestInitParameters struct { + + // Whether to enable encryption at rest. If the encrypt_at_rest block is not provided then this defaults to false. Enabling encryption on new domains requires elasticsearch_version 5.1 or greater. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // KMS key ARN to encrypt the Elasticsearch domain with. If not specified then it defaults to using the aws/es service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` +} + type EncryptAtRestObservation struct { // Whether to enable encryption at rest. If the encrypt_at_rest block is not provided then this defaults to false. Enabling encryption on new domains requires elasticsearch_version 5.1 or greater. @@ -448,7 +638,7 @@ type EncryptAtRestObservation struct { type EncryptAtRestParameters struct { // Whether to enable encryption at rest. If the encrypt_at_rest block is not provided then this defaults to false. Enabling encryption on new domains requires elasticsearch_version 5.1 or greater. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // KMS key ARN to encrypt the Elasticsearch domain with. If not specified then it defaults to using the aws/es service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. @@ -456,6 +646,18 @@ type EncryptAtRestParameters struct { KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` } +type LogPublishingOptionsInitParameters struct { + + // ARN of the Cloudwatch log group to which log needs to be published. + CloudwatchLogGroupArn *string `json:"cloudwatchLogGroupArn,omitempty" tf:"cloudwatch_log_group_arn,omitempty"` + + // Whether given log publishing option is enabled or not. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS, AUDIT_LOGS. + LogType *string `json:"logType,omitempty" tf:"log_type,omitempty"` +} + type LogPublishingOptionsObservation struct { // ARN of the Cloudwatch log group to which log needs to be published. @@ -471,7 +673,7 @@ type LogPublishingOptionsObservation struct { type LogPublishingOptionsParameters struct { // ARN of the Cloudwatch log group to which log needs to be published. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional CloudwatchLogGroupArn *string `json:"cloudwatchLogGroupArn" tf:"cloudwatch_log_group_arn,omitempty"` // Whether given log publishing option is enabled or not. @@ -479,10 +681,22 @@ type LogPublishingOptionsParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` // Type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS, AUDIT_LOGS. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional LogType *string `json:"logType" tf:"log_type,omitempty"` } +type MaintenanceScheduleInitParameters struct { + + // A cron expression specifying the recurrence pattern for an Auto-Tune maintenance schedule. + CronExpressionForRecurrence *string `json:"cronExpressionForRecurrence,omitempty" tf:"cron_expression_for_recurrence,omitempty"` + + // Configuration block for the duration of the Auto-Tune maintenance window. Detailed below. + Duration []DurationInitParameters `json:"duration,omitempty" tf:"duration,omitempty"` + + // Date and time at which to start the Auto-Tune maintenance schedule in RFC3339 format. + StartAt *string `json:"startAt,omitempty" tf:"start_at,omitempty"` +} + type MaintenanceScheduleObservation struct { // A cron expression specifying the recurrence pattern for an Auto-Tune maintenance schedule. @@ -498,18 +712,27 @@ type MaintenanceScheduleObservation struct { type MaintenanceScheduleParameters struct { // A cron expression specifying the recurrence pattern for an Auto-Tune maintenance schedule. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional CronExpressionForRecurrence *string `json:"cronExpressionForRecurrence" tf:"cron_expression_for_recurrence,omitempty"` // Configuration block for the duration of the Auto-Tune maintenance window. Detailed below. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Duration []DurationParameters `json:"duration" tf:"duration,omitempty"` // Date and time at which to start the Auto-Tune maintenance schedule in RFC3339 format. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional StartAt *string `json:"startAt" tf:"start_at,omitempty"` } +type MasterUserOptionsInitParameters struct { + + // ARN for the main user. Only specify if internal_user_database_enabled is not set or set to false. + MasterUserArn *string `json:"masterUserArn,omitempty" tf:"master_user_arn,omitempty"` + + // Main user's username, which is stored in the Amazon Elasticsearch Service domain's internal database. Only specify if internal_user_database_enabled is set to true. + MasterUserName *string `json:"masterUserName,omitempty" tf:"master_user_name,omitempty"` +} + type MasterUserOptionsObservation struct { // ARN for the main user. Only specify if internal_user_database_enabled is not set or set to false. @@ -534,6 +757,12 @@ type MasterUserOptionsParameters struct { MasterUserPasswordSecretRef *v1.SecretKeySelector `json:"masterUserPasswordSecretRef,omitempty" tf:"-"` } +type NodeToNodeEncryptionInitParameters struct { + + // Whether to enable node-to-node encryption. If the node_to_node_encryption block is not provided then this defaults to false. Enabling node-to-node encryption of a new domain requires an elasticsearch_version of 6.0 or greater. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type NodeToNodeEncryptionObservation struct { // Whether to enable node-to-node encryption. If the node_to_node_encryption block is not provided then this defaults to false. Enabling node-to-node encryption of a new domain requires an elasticsearch_version of 6.0 or greater. @@ -543,10 +772,16 @@ type NodeToNodeEncryptionObservation struct { type NodeToNodeEncryptionParameters struct { // Whether to enable node-to-node encryption. If the node_to_node_encryption block is not provided then this defaults to false. Enabling node-to-node encryption of a new domain requires an elasticsearch_version of 6.0 or greater. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` } +type SnapshotOptionsInitParameters struct { + + // Hour during which the service takes an automated daily snapshot of the indices in the domain. + AutomatedSnapshotStartHour *float64 `json:"automatedSnapshotStartHour,omitempty" tf:"automated_snapshot_start_hour,omitempty"` +} + type SnapshotOptionsObservation struct { // Hour during which the service takes an automated daily snapshot of the indices in the domain. @@ -556,10 +791,19 @@ type SnapshotOptionsObservation struct { type SnapshotOptionsParameters struct { // Hour during which the service takes an automated daily snapshot of the indices in the domain. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional AutomatedSnapshotStartHour *float64 `json:"automatedSnapshotStartHour" tf:"automated_snapshot_start_hour,omitempty"` } +type VPCOptionsInitParameters struct { + + // List of VPC Security Group IDs to be applied to the Elasticsearch domain endpoints. If omitted, the default Security Group for the VPC will be used. + SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` + + // List of VPC Subnet IDs for the Elasticsearch domain endpoints to be created in. + SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` +} + type VPCOptionsObservation struct { // If the domain was created inside a VPC, the names of the availability zones the configured subnet_ids were created inside. @@ -586,6 +830,12 @@ type VPCOptionsParameters struct { SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` } +type ZoneAwarenessConfigInitParameters struct { + + // Number of Availability Zones for the domain to use with zone_awareness_enabled. Defaults to 2. Valid values: 2 or 3. + AvailabilityZoneCount *float64 `json:"availabilityZoneCount,omitempty" tf:"availability_zone_count,omitempty"` +} + type ZoneAwarenessConfigObservation struct { // Number of Availability Zones for the domain to use with zone_awareness_enabled. Defaults to 2. Valid values: 2 or 3. @@ -603,6 +853,17 @@ type ZoneAwarenessConfigParameters struct { type DomainSpec struct { v1.ResourceSpec `json:",inline"` ForProvider DomainParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 DomainInitParameters `json:"initProvider,omitempty"` } // DomainStatus defines the observed state of Domain. @@ -623,7 +884,7 @@ type DomainStatus struct { type Domain struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec DomainSpec `json:"spec"` Status DomainStatus `json:"status,omitempty"` } diff --git a/apis/elasticsearch/v1alpha1/zz_domainpolicy_types.go b/apis/elasticsearch/v1alpha1/zz_domainpolicy_types.go index 796808f..a87c0b7 100755 --- a/apis/elasticsearch/v1alpha1/zz_domainpolicy_types.go +++ b/apis/elasticsearch/v1alpha1/zz_domainpolicy_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DomainPolicyInitParameters struct { + + // IAM policy document specifying the access policies for the domain + AccessPolicies *string `json:"accessPolicies,omitempty" tf:"access_policies,omitempty"` +} + type DomainPolicyObservation struct { // IAM policy document specifying the access policies for the domain @@ -31,9 +41,18 @@ type DomainPolicyParameters struct { AccessPolicies *string `json:"accessPolicies,omitempty" tf:"access_policies,omitempty"` // Name of the domain. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/elasticsearch/v1alpha1.Domain // +kubebuilder:validation:Optional DomainName *string `json:"domainName,omitempty" tf:"domain_name,omitempty"` + // Reference to a Domain in elasticsearch to populate domainName. + // +kubebuilder:validation:Optional + DomainNameRef *v1.Reference `json:"domainNameRef,omitempty" tf:"-"` + + // Selector for a Domain in elasticsearch to populate domainName. + // +kubebuilder:validation:Optional + DomainNameSelector *v1.Selector `json:"domainNameSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -44,6 +63,17 @@ type DomainPolicyParameters struct { type DomainPolicySpec struct { v1.ResourceSpec `json:",inline"` ForProvider DomainPolicyParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 DomainPolicyInitParameters `json:"initProvider,omitempty"` } // DomainPolicyStatus defines the observed state of DomainPolicy. @@ -64,9 +94,8 @@ type DomainPolicyStatus struct { type DomainPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.accessPolicies)",message="accessPolicies is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.domainName)",message="domainName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accessPolicies) || (has(self.initProvider) && has(self.initProvider.accessPolicies))",message="spec.forProvider.accessPolicies is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec DomainPolicySpec `json:"spec"` Status DomainPolicyStatus `json:"status,omitempty"` } diff --git a/apis/elasticsearch/v1alpha1/zz_domainsamloptions_types.go b/apis/elasticsearch/v1alpha1/zz_domainsamloptions_types.go index e5361b6..7d43172 100755 --- a/apis/elasticsearch/v1alpha1/zz_domainsamloptions_types.go +++ b/apis/elasticsearch/v1alpha1/zz_domainsamloptions_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DomainSAMLOptionsInitParameters struct { + + // The SAML authentication options for an AWS Elasticsearch Domain. + SAMLOptions []SAMLOptionsInitParameters `json:"samlOptions,omitempty" tf:"saml_options,omitempty"` +} + type DomainSAMLOptionsObservation struct { // The name of the domain the SAML options are associated with. @@ -34,6 +44,15 @@ type DomainSAMLOptionsParameters struct { SAMLOptions []SAMLOptionsParameters `json:"samlOptions,omitempty" tf:"saml_options,omitempty"` } +type IdpInitParameters struct { + + // The unique Entity ID of the application in SAML Identity Provider. + EntityID *string `json:"entityId,omitempty" tf:"entity_id,omitempty"` + + // The Metadata of the SAML application in xml format. + MetadataContent *string `json:"metadataContent,omitempty" tf:"metadata_content,omitempty"` +} + type IdpObservation struct { // The unique Entity ID of the application in SAML Identity Provider. @@ -46,14 +65,35 @@ type IdpObservation struct { type IdpParameters struct { // The unique Entity ID of the application in SAML Identity Provider. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional EntityID *string `json:"entityId" tf:"entity_id,omitempty"` // The Metadata of the SAML application in xml format. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional MetadataContent *string `json:"metadataContent" tf:"metadata_content,omitempty"` } +type SAMLOptionsInitParameters struct { + + // Whether SAML authentication is enabled. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Information from your identity provider. + Idp []IdpInitParameters `json:"idp,omitempty" tf:"idp,omitempty"` + + // This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user. + MasterBackendRole *string `json:"masterBackendRole,omitempty" tf:"master_backend_role,omitempty"` + + // Element of the SAML assertion to use for backend roles. Default is roles. + RolesKey *string `json:"rolesKey,omitempty" tf:"roles_key,omitempty"` + + // Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440. + SessionTimeoutMinutes *float64 `json:"sessionTimeoutMinutes,omitempty" tf:"session_timeout_minutes,omitempty"` + + // Custom SAML attribute to use for user names. Default is an empty string - "". This will cause Elasticsearch to use the NameID element of the Subject, which is the default location for name identifiers in the SAML specification. + SubjectKey *string `json:"subjectKey,omitempty" tf:"subject_key,omitempty"` +} + type SAMLOptionsObservation struct { // Whether SAML authentication is enabled. @@ -110,6 +150,17 @@ type SAMLOptionsParameters struct { type DomainSAMLOptionsSpec struct { v1.ResourceSpec `json:",inline"` ForProvider DomainSAMLOptionsParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 DomainSAMLOptionsInitParameters `json:"initProvider,omitempty"` } // DomainSAMLOptionsStatus defines the observed state of DomainSAMLOptions. @@ -130,7 +181,7 @@ type DomainSAMLOptionsStatus struct { type DomainSAMLOptions struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec DomainSAMLOptionsSpec `json:"spec"` Status DomainSAMLOptionsStatus `json:"status,omitempty"` } diff --git a/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go b/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go index 3acce8e..ec0f4ee 100644 --- a/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go +++ b/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,38 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AdvancedSecurityOptionsInitParameters) DeepCopyInto(out *AdvancedSecurityOptionsInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.InternalUserDatabaseEnabled != nil { + in, out := &in.InternalUserDatabaseEnabled, &out.InternalUserDatabaseEnabled + *out = new(bool) + **out = **in + } + if in.MasterUserOptions != nil { + in, out := &in.MasterUserOptions, &out.MasterUserOptions + *out = make([]MasterUserOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvancedSecurityOptionsInitParameters. +func (in *AdvancedSecurityOptionsInitParameters) DeepCopy() *AdvancedSecurityOptionsInitParameters { + if in == nil { + return nil + } + out := new(AdvancedSecurityOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AdvancedSecurityOptionsObservation) DeepCopyInto(out *AdvancedSecurityOptionsObservation) { *out = *in @@ -78,6 +109,38 @@ func (in *AdvancedSecurityOptionsParameters) DeepCopy() *AdvancedSecurityOptions return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AutoTuneOptionsInitParameters) DeepCopyInto(out *AutoTuneOptionsInitParameters) { + *out = *in + if in.DesiredState != nil { + in, out := &in.DesiredState, &out.DesiredState + *out = new(string) + **out = **in + } + if in.MaintenanceSchedule != nil { + in, out := &in.MaintenanceSchedule, &out.MaintenanceSchedule + *out = make([]MaintenanceScheduleInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RollbackOnDisable != nil { + in, out := &in.RollbackOnDisable, &out.RollbackOnDisable + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoTuneOptionsInitParameters. +func (in *AutoTuneOptionsInitParameters) DeepCopy() *AutoTuneOptionsInitParameters { + if in == nil { + return nil + } + out := new(AutoTuneOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AutoTuneOptionsObservation) DeepCopyInto(out *AutoTuneOptionsObservation) { *out = *in @@ -142,6 +205,80 @@ func (in *AutoTuneOptionsParameters) DeepCopy() *AutoTuneOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConfigInitParameters) DeepCopyInto(out *ClusterConfigInitParameters) { + *out = *in + if in.ColdStorageOptions != nil { + in, out := &in.ColdStorageOptions, &out.ColdStorageOptions + *out = make([]ColdStorageOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DedicatedMasterCount != nil { + in, out := &in.DedicatedMasterCount, &out.DedicatedMasterCount + *out = new(float64) + **out = **in + } + if in.DedicatedMasterEnabled != nil { + in, out := &in.DedicatedMasterEnabled, &out.DedicatedMasterEnabled + *out = new(bool) + **out = **in + } + if in.DedicatedMasterType != nil { + in, out := &in.DedicatedMasterType, &out.DedicatedMasterType + *out = new(string) + **out = **in + } + if in.InstanceCount != nil { + in, out := &in.InstanceCount, &out.InstanceCount + *out = new(float64) + **out = **in + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.WarmCount != nil { + in, out := &in.WarmCount, &out.WarmCount + *out = new(float64) + **out = **in + } + if in.WarmEnabled != nil { + in, out := &in.WarmEnabled, &out.WarmEnabled + *out = new(bool) + **out = **in + } + if in.WarmType != nil { + in, out := &in.WarmType, &out.WarmType + *out = new(string) + **out = **in + } + if in.ZoneAwarenessConfig != nil { + in, out := &in.ZoneAwarenessConfig, &out.ZoneAwarenessConfig + *out = make([]ZoneAwarenessConfigInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ZoneAwarenessEnabled != nil { + in, out := &in.ZoneAwarenessEnabled, &out.ZoneAwarenessEnabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigInitParameters. +func (in *ClusterConfigInitParameters) DeepCopy() *ClusterConfigInitParameters { + if in == nil { + return nil + } + out := new(ClusterConfigInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterConfigObservation) DeepCopyInto(out *ClusterConfigObservation) { *out = *in @@ -290,6 +427,41 @@ func (in *ClusterConfigParameters) DeepCopy() *ClusterConfigParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CognitoOptionsInitParameters) DeepCopyInto(out *CognitoOptionsInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.IdentityPoolID != nil { + in, out := &in.IdentityPoolID, &out.IdentityPoolID + *out = new(string) + **out = **in + } + if in.RoleArn != nil { + in, out := &in.RoleArn, &out.RoleArn + *out = new(string) + **out = **in + } + if in.UserPoolID != nil { + in, out := &in.UserPoolID, &out.UserPoolID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CognitoOptionsInitParameters. +func (in *CognitoOptionsInitParameters) DeepCopy() *CognitoOptionsInitParameters { + if in == nil { + return nil + } + out := new(CognitoOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CognitoOptionsObservation) DeepCopyInto(out *CognitoOptionsObservation) { *out = *in @@ -360,6 +532,26 @@ func (in *CognitoOptionsParameters) DeepCopy() *CognitoOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ColdStorageOptionsInitParameters) DeepCopyInto(out *ColdStorageOptionsInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ColdStorageOptionsInitParameters. +func (in *ColdStorageOptionsInitParameters) DeepCopy() *ColdStorageOptionsInitParameters { + if in == nil { + return nil + } + out := new(ColdStorageOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ColdStorageOptionsObservation) DeepCopyInto(out *ColdStorageOptionsObservation) { *out = *in @@ -427,6 +619,46 @@ func (in *Domain) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainEndpointOptionsInitParameters) DeepCopyInto(out *DomainEndpointOptionsInitParameters) { + *out = *in + if in.CustomEndpoint != nil { + in, out := &in.CustomEndpoint, &out.CustomEndpoint + *out = new(string) + **out = **in + } + if in.CustomEndpointCertificateArn != nil { + in, out := &in.CustomEndpointCertificateArn, &out.CustomEndpointCertificateArn + *out = new(string) + **out = **in + } + if in.CustomEndpointEnabled != nil { + in, out := &in.CustomEndpointEnabled, &out.CustomEndpointEnabled + *out = new(bool) + **out = **in + } + if in.EnforceHTTPS != nil { + in, out := &in.EnforceHTTPS, &out.EnforceHTTPS + *out = new(bool) + **out = **in + } + if in.TLSSecurityPolicy != nil { + in, out := &in.TLSSecurityPolicy, &out.TLSSecurityPolicy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainEndpointOptionsInitParameters. +func (in *DomainEndpointOptionsInitParameters) DeepCopy() *DomainEndpointOptionsInitParameters { + if in == nil { + return nil + } + out := new(DomainEndpointOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DomainEndpointOptionsObservation) DeepCopyInto(out *DomainEndpointOptionsObservation) { *out = *in @@ -507,6 +739,156 @@ func (in *DomainEndpointOptionsParameters) DeepCopy() *DomainEndpointOptionsPara return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainInitParameters) DeepCopyInto(out *DomainInitParameters) { + *out = *in + if in.AccessPolicies != nil { + in, out := &in.AccessPolicies, &out.AccessPolicies + *out = new(string) + **out = **in + } + if in.AdvancedOptions != nil { + in, out := &in.AdvancedOptions, &out.AdvancedOptions + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.AdvancedSecurityOptions != nil { + in, out := &in.AdvancedSecurityOptions, &out.AdvancedSecurityOptions + *out = make([]AdvancedSecurityOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AutoTuneOptions != nil { + in, out := &in.AutoTuneOptions, &out.AutoTuneOptions + *out = make([]AutoTuneOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ClusterConfig != nil { + in, out := &in.ClusterConfig, &out.ClusterConfig + *out = make([]ClusterConfigInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.CognitoOptions != nil { + in, out := &in.CognitoOptions, &out.CognitoOptions + *out = make([]CognitoOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DomainEndpointOptions != nil { + in, out := &in.DomainEndpointOptions, &out.DomainEndpointOptions + *out = make([]DomainEndpointOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EBSOptions != nil { + in, out := &in.EBSOptions, &out.EBSOptions + *out = make([]EBSOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ElasticsearchVersion != nil { + in, out := &in.ElasticsearchVersion, &out.ElasticsearchVersion + *out = new(string) + **out = **in + } + if in.EncryptAtRest != nil { + in, out := &in.EncryptAtRest, &out.EncryptAtRest + *out = make([]EncryptAtRestInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LogPublishingOptions != nil { + in, out := &in.LogPublishingOptions, &out.LogPublishingOptions + *out = make([]LogPublishingOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NodeToNodeEncryption != nil { + in, out := &in.NodeToNodeEncryption, &out.NodeToNodeEncryption + *out = make([]NodeToNodeEncryptionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SnapshotOptions != nil { + in, out := &in.SnapshotOptions, &out.SnapshotOptions + *out = make([]SnapshotOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCOptions != nil { + in, out := &in.VPCOptions, &out.VPCOptions + *out = make([]VPCOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainInitParameters. +func (in *DomainInitParameters) DeepCopy() *DomainInitParameters { + if in == nil { + return nil + } + out := new(DomainInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DomainList) DeepCopyInto(out *DomainList) { *out = *in @@ -555,7 +937,8 @@ func (in *DomainObservation) DeepCopyInto(out *DomainObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -670,7 +1053,8 @@ func (in *DomainObservation) DeepCopyInto(out *DomainObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -685,7 +1069,8 @@ func (in *DomainObservation) DeepCopyInto(out *DomainObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -727,7 +1112,8 @@ func (in *DomainParameters) DeepCopyInto(out *DomainParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -822,7 +1208,8 @@ func (in *DomainParameters) DeepCopyInto(out *DomainParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -837,7 +1224,8 @@ func (in *DomainParameters) DeepCopyInto(out *DomainParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -890,6 +1278,26 @@ func (in *DomainPolicy) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainPolicyInitParameters) DeepCopyInto(out *DomainPolicyInitParameters) { + *out = *in + if in.AccessPolicies != nil { + in, out := &in.AccessPolicies, &out.AccessPolicies + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainPolicyInitParameters. +func (in *DomainPolicyInitParameters) DeepCopy() *DomainPolicyInitParameters { + if in == nil { + return nil + } + out := new(DomainPolicyInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DomainPolicyList) DeepCopyInto(out *DomainPolicyList) { *out = *in @@ -965,6 +1373,16 @@ func (in *DomainPolicyParameters) DeepCopyInto(out *DomainPolicyParameters) { *out = new(string) **out = **in } + if in.DomainNameRef != nil { + in, out := &in.DomainNameRef, &out.DomainNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DomainNameSelector != nil { + in, out := &in.DomainNameSelector, &out.DomainNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -987,6 +1405,7 @@ func (in *DomainPolicySpec) DeepCopyInto(out *DomainPolicySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainPolicySpec. @@ -1043,6 +1462,28 @@ func (in *DomainSAMLOptions) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainSAMLOptionsInitParameters) DeepCopyInto(out *DomainSAMLOptionsInitParameters) { + *out = *in + if in.SAMLOptions != nil { + in, out := &in.SAMLOptions, &out.SAMLOptions + *out = make([]SAMLOptionsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainSAMLOptionsInitParameters. +func (in *DomainSAMLOptionsInitParameters) DeepCopy() *DomainSAMLOptionsInitParameters { + if in == nil { + return nil + } + out := new(DomainSAMLOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DomainSAMLOptionsList) DeepCopyInto(out *DomainSAMLOptionsList) { *out = *in @@ -1134,6 +1575,7 @@ func (in *DomainSAMLOptionsSpec) DeepCopyInto(out *DomainSAMLOptionsSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainSAMLOptionsSpec. @@ -1168,6 +1610,7 @@ func (in *DomainSpec) DeepCopyInto(out *DomainSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainSpec. @@ -1197,6 +1640,31 @@ func (in *DomainStatus) DeepCopy() *DomainStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DurationInitParameters) DeepCopyInto(out *DurationInitParameters) { + *out = *in + if in.Unit != nil { + in, out := &in.Unit, &out.Unit + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DurationInitParameters. +func (in *DurationInitParameters) DeepCopy() *DurationInitParameters { + if in == nil { + return nil + } + out := new(DurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DurationObservation) DeepCopyInto(out *DurationObservation) { *out = *in @@ -1230,19 +1698,59 @@ func (in *DurationParameters) DeepCopyInto(out *DurationParameters) { *out = new(string) **out = **in } - if in.Value != nil { - in, out := &in.Value, &out.Value + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DurationParameters. +func (in *DurationParameters) DeepCopy() *DurationParameters { + if in == nil { + return nil + } + out := new(DurationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EBSOptionsInitParameters) DeepCopyInto(out *EBSOptionsInitParameters) { + *out = *in + if in.EBSEnabled != nil { + in, out := &in.EBSEnabled, &out.EBSEnabled + *out = new(bool) + **out = **in + } + if in.Iops != nil { + in, out := &in.Iops, &out.Iops + *out = new(float64) + **out = **in + } + if in.Throughput != nil { + in, out := &in.Throughput, &out.Throughput + *out = new(float64) + **out = **in + } + if in.VolumeSize != nil { + in, out := &in.VolumeSize, &out.VolumeSize *out = new(float64) **out = **in } + if in.VolumeType != nil { + in, out := &in.VolumeType, &out.VolumeType + *out = new(string) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DurationParameters. -func (in *DurationParameters) DeepCopy() *DurationParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EBSOptionsInitParameters. +func (in *EBSOptionsInitParameters) DeepCopy() *EBSOptionsInitParameters { if in == nil { return nil } - out := new(DurationParameters) + out := new(EBSOptionsInitParameters) in.DeepCopyInto(out) return out } @@ -1327,6 +1835,31 @@ func (in *EBSOptionsParameters) DeepCopy() *EBSOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptAtRestInitParameters) DeepCopyInto(out *EncryptAtRestInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptAtRestInitParameters. +func (in *EncryptAtRestInitParameters) DeepCopy() *EncryptAtRestInitParameters { + if in == nil { + return nil + } + out := new(EncryptAtRestInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EncryptAtRestObservation) DeepCopyInto(out *EncryptAtRestObservation) { *out = *in @@ -1377,6 +1910,31 @@ func (in *EncryptAtRestParameters) DeepCopy() *EncryptAtRestParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdpInitParameters) DeepCopyInto(out *IdpInitParameters) { + *out = *in + if in.EntityID != nil { + in, out := &in.EntityID, &out.EntityID + *out = new(string) + **out = **in + } + if in.MetadataContent != nil { + in, out := &in.MetadataContent, &out.MetadataContent + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdpInitParameters. +func (in *IdpInitParameters) DeepCopy() *IdpInitParameters { + if in == nil { + return nil + } + out := new(IdpInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IdpObservation) DeepCopyInto(out *IdpObservation) { *out = *in @@ -1427,6 +1985,36 @@ func (in *IdpParameters) DeepCopy() *IdpParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LogPublishingOptionsInitParameters) DeepCopyInto(out *LogPublishingOptionsInitParameters) { + *out = *in + if in.CloudwatchLogGroupArn != nil { + in, out := &in.CloudwatchLogGroupArn, &out.CloudwatchLogGroupArn + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.LogType != nil { + in, out := &in.LogType, &out.LogType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogPublishingOptionsInitParameters. +func (in *LogPublishingOptionsInitParameters) DeepCopy() *LogPublishingOptionsInitParameters { + if in == nil { + return nil + } + out := new(LogPublishingOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LogPublishingOptionsObservation) DeepCopyInto(out *LogPublishingOptionsObservation) { *out = *in @@ -1487,6 +2075,38 @@ func (in *LogPublishingOptionsParameters) DeepCopy() *LogPublishingOptionsParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceScheduleInitParameters) DeepCopyInto(out *MaintenanceScheduleInitParameters) { + *out = *in + if in.CronExpressionForRecurrence != nil { + in, out := &in.CronExpressionForRecurrence, &out.CronExpressionForRecurrence + *out = new(string) + **out = **in + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = make([]DurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StartAt != nil { + in, out := &in.StartAt, &out.StartAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceScheduleInitParameters. +func (in *MaintenanceScheduleInitParameters) DeepCopy() *MaintenanceScheduleInitParameters { + if in == nil { + return nil + } + out := new(MaintenanceScheduleInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MaintenanceScheduleObservation) DeepCopyInto(out *MaintenanceScheduleObservation) { *out = *in @@ -1551,6 +2171,31 @@ func (in *MaintenanceScheduleParameters) DeepCopy() *MaintenanceScheduleParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MasterUserOptionsInitParameters) DeepCopyInto(out *MasterUserOptionsInitParameters) { + *out = *in + if in.MasterUserArn != nil { + in, out := &in.MasterUserArn, &out.MasterUserArn + *out = new(string) + **out = **in + } + if in.MasterUserName != nil { + in, out := &in.MasterUserName, &out.MasterUserName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterUserOptionsInitParameters. +func (in *MasterUserOptionsInitParameters) DeepCopy() *MasterUserOptionsInitParameters { + if in == nil { + return nil + } + out := new(MasterUserOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MasterUserOptionsObservation) DeepCopyInto(out *MasterUserOptionsObservation) { *out = *in @@ -1606,6 +2251,26 @@ func (in *MasterUserOptionsParameters) DeepCopy() *MasterUserOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeToNodeEncryptionInitParameters) DeepCopyInto(out *NodeToNodeEncryptionInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeToNodeEncryptionInitParameters. +func (in *NodeToNodeEncryptionInitParameters) DeepCopy() *NodeToNodeEncryptionInitParameters { + if in == nil { + return nil + } + out := new(NodeToNodeEncryptionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeToNodeEncryptionObservation) DeepCopyInto(out *NodeToNodeEncryptionObservation) { *out = *in @@ -1646,6 +2311,53 @@ func (in *NodeToNodeEncryptionParameters) DeepCopy() *NodeToNodeEncryptionParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SAMLOptionsInitParameters) DeepCopyInto(out *SAMLOptionsInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Idp != nil { + in, out := &in.Idp, &out.Idp + *out = make([]IdpInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MasterBackendRole != nil { + in, out := &in.MasterBackendRole, &out.MasterBackendRole + *out = new(string) + **out = **in + } + if in.RolesKey != nil { + in, out := &in.RolesKey, &out.RolesKey + *out = new(string) + **out = **in + } + if in.SessionTimeoutMinutes != nil { + in, out := &in.SessionTimeoutMinutes, &out.SessionTimeoutMinutes + *out = new(float64) + **out = **in + } + if in.SubjectKey != nil { + in, out := &in.SubjectKey, &out.SubjectKey + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SAMLOptionsInitParameters. +func (in *SAMLOptionsInitParameters) DeepCopy() *SAMLOptionsInitParameters { + if in == nil { + return nil + } + out := new(SAMLOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SAMLOptionsObservation) DeepCopyInto(out *SAMLOptionsObservation) { *out = *in @@ -1745,6 +2457,26 @@ func (in *SAMLOptionsParameters) DeepCopy() *SAMLOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SnapshotOptionsInitParameters) DeepCopyInto(out *SnapshotOptionsInitParameters) { + *out = *in + if in.AutomatedSnapshotStartHour != nil { + in, out := &in.AutomatedSnapshotStartHour, &out.AutomatedSnapshotStartHour + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotOptionsInitParameters. +func (in *SnapshotOptionsInitParameters) DeepCopy() *SnapshotOptionsInitParameters { + if in == nil { + return nil + } + out := new(SnapshotOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SnapshotOptionsObservation) DeepCopyInto(out *SnapshotOptionsObservation) { *out = *in @@ -1785,6 +2517,43 @@ func (in *SnapshotOptionsParameters) DeepCopy() *SnapshotOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VPCOptionsInitParameters) DeepCopyInto(out *VPCOptionsInitParameters) { + *out = *in + if in.SecurityGroupIds != nil { + in, out := &in.SecurityGroupIds, &out.SecurityGroupIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SubnetIds != nil { + in, out := &in.SubnetIds, &out.SubnetIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCOptionsInitParameters. +func (in *VPCOptionsInitParameters) DeepCopy() *VPCOptionsInitParameters { + if in == nil { + return nil + } + out := new(VPCOptionsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCOptionsObservation) DeepCopyInto(out *VPCOptionsObservation) { *out = *in @@ -1875,6 +2644,26 @@ func (in *VPCOptionsParameters) DeepCopy() *VPCOptionsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneAwarenessConfigInitParameters) DeepCopyInto(out *ZoneAwarenessConfigInitParameters) { + *out = *in + if in.AvailabilityZoneCount != nil { + in, out := &in.AvailabilityZoneCount, &out.AvailabilityZoneCount + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneAwarenessConfigInitParameters. +func (in *ZoneAwarenessConfigInitParameters) DeepCopy() *ZoneAwarenessConfigInitParameters { + if in == nil { + return nil + } + out := new(ZoneAwarenessConfigInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ZoneAwarenessConfigObservation) DeepCopyInto(out *ZoneAwarenessConfigObservation) { *out = *in diff --git a/apis/elasticsearch/v1alpha1/zz_generated.managed.go b/apis/elasticsearch/v1alpha1/zz_generated.managed.go index 4235d2f..1155c2b 100644 --- a/apis/elasticsearch/v1alpha1/zz_generated.managed.go +++ b/apis/elasticsearch/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Domain) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Domain. -func (mg *Domain) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Domain. +func (mg *Domain) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Domain. @@ -27,14 +27,6 @@ func (mg *Domain) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Domain. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Domain) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Domain. func (mg *Domain) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Domain) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Domain. -func (mg *Domain) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Domain. +func (mg *Domain) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Domain. @@ -65,14 +57,6 @@ func (mg *Domain) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Domain. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Domain) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Domain. func (mg *Domain) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *DomainPolicy) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this DomainPolicy. -func (mg *DomainPolicy) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this DomainPolicy. +func (mg *DomainPolicy) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this DomainPolicy. @@ -103,14 +87,6 @@ func (mg *DomainPolicy) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DomainPolicy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DomainPolicy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DomainPolicy. func (mg *DomainPolicy) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *DomainPolicy) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this DomainPolicy. -func (mg *DomainPolicy) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this DomainPolicy. +func (mg *DomainPolicy) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this DomainPolicy. @@ -141,14 +117,6 @@ func (mg *DomainPolicy) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DomainPolicy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DomainPolicy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DomainPolicy. func (mg *DomainPolicy) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *DomainSAMLOptions) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this DomainSAMLOptions. -func (mg *DomainSAMLOptions) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this DomainSAMLOptions. +func (mg *DomainSAMLOptions) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this DomainSAMLOptions. @@ -179,14 +147,6 @@ func (mg *DomainSAMLOptions) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DomainSAMLOptions. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DomainSAMLOptions) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DomainSAMLOptions. func (mg *DomainSAMLOptions) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *DomainSAMLOptions) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this DomainSAMLOptions. -func (mg *DomainSAMLOptions) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this DomainSAMLOptions. +func (mg *DomainSAMLOptions) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this DomainSAMLOptions. @@ -217,14 +177,6 @@ func (mg *DomainSAMLOptions) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DomainSAMLOptions. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DomainSAMLOptions) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DomainSAMLOptions. func (mg *DomainSAMLOptions) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/elasticsearch/v1alpha1/zz_generated.resolvers.go b/apis/elasticsearch/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..10ac623 --- /dev/null +++ b/apis/elasticsearch/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,39 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this DomainPolicy. +func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DomainName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DomainNameRef, + Selector: mg.Spec.ForProvider.DomainNameSelector, + To: reference.To{ + List: &DomainList{}, + Managed: &Domain{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DomainName") + } + mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/elasticsearch/v1alpha1/zz_generated_terraformed.go b/apis/elasticsearch/v1alpha1/zz_generated_terraformed.go index 8e58247..19fd6e3 100755 --- a/apis/elasticsearch/v1alpha1/zz_generated_terraformed.go +++ b/apis/elasticsearch/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Domain @@ -69,6 +74,46 @@ func (tr *Domain) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Domain +func (tr *Domain) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Domain +func (tr *Domain) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Domain using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Domain) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *DomainPolicy) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DomainPolicy +func (tr *DomainPolicy) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DomainPolicy +func (tr *DomainPolicy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DomainPolicy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DomainPolicy) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *DomainSAMLOptions) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DomainSAMLOptions +func (tr *DomainSAMLOptions) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DomainSAMLOptions +func (tr *DomainSAMLOptions) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DomainSAMLOptions using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DomainSAMLOptions) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/elasticsearch/v1alpha1/zz_groupversion_info.go b/apis/elasticsearch/v1alpha1/zz_groupversion_info.go index c38321d..f38eae5 100755 --- a/apis/elasticsearch/v1alpha1/zz_groupversion_info.go +++ b/apis/elasticsearch/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/generate.go b/apis/generate.go index 7dcd77d..233d170 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -19,7 +19,7 @@ Copyright 2021 Upbound Inc. //go:generate rm -rf ../examples-generated // Generate documentation from Terraform docs. -//go:generate go run github.com/upbound/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml +//go:generate go run github.com/crossplane/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml // Run Upjet generator //go:generate go run ../cmd/generator/main.go .. diff --git a/apis/iam/v1alpha1/zz_generated.deepcopy.go b/apis/iam/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..c7a7d7c --- /dev/null +++ b/apis/iam/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,549 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InlinePolicyInitParameters) DeepCopyInto(out *InlinePolicyInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlinePolicyInitParameters. +func (in *InlinePolicyInitParameters) DeepCopy() *InlinePolicyInitParameters { + if in == nil { + return nil + } + out := new(InlinePolicyInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InlinePolicyObservation) DeepCopyInto(out *InlinePolicyObservation) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlinePolicyObservation. +func (in *InlinePolicyObservation) DeepCopy() *InlinePolicyObservation { + if in == nil { + return nil + } + out := new(InlinePolicyObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InlinePolicyParameters) DeepCopyInto(out *InlinePolicyParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlinePolicyParameters. +func (in *InlinePolicyParameters) DeepCopy() *InlinePolicyParameters { + if in == nil { + return nil + } + out := new(InlinePolicyParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Role) DeepCopyInto(out *Role) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role. +func (in *Role) DeepCopy() *Role { + if in == nil { + return nil + } + out := new(Role) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Role) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleInitParameters) DeepCopyInto(out *RoleInitParameters) { + *out = *in + if in.AssumeRolePolicy != nil { + in, out := &in.AssumeRolePolicy, &out.AssumeRolePolicy + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceDetachPolicies != nil { + in, out := &in.ForceDetachPolicies, &out.ForceDetachPolicies + *out = new(bool) + **out = **in + } + if in.InlinePolicy != nil { + in, out := &in.InlinePolicy, &out.InlinePolicy + *out = make([]InlinePolicyInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ManagedPolicyArns != nil { + in, out := &in.ManagedPolicyArns, &out.ManagedPolicyArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.MaxSessionDuration != nil { + in, out := &in.MaxSessionDuration, &out.MaxSessionDuration + *out = new(float64) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } + if in.PermissionsBoundary != nil { + in, out := &in.PermissionsBoundary, &out.PermissionsBoundary + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleInitParameters. +func (in *RoleInitParameters) DeepCopy() *RoleInitParameters { + if in == nil { + return nil + } + out := new(RoleInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleLastUsedInitParameters) DeepCopyInto(out *RoleLastUsedInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleLastUsedInitParameters. +func (in *RoleLastUsedInitParameters) DeepCopy() *RoleLastUsedInitParameters { + if in == nil { + return nil + } + out := new(RoleLastUsedInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleLastUsedObservation) DeepCopyInto(out *RoleLastUsedObservation) { + *out = *in + if in.LastUsedDate != nil { + in, out := &in.LastUsedDate, &out.LastUsedDate + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleLastUsedObservation. +func (in *RoleLastUsedObservation) DeepCopy() *RoleLastUsedObservation { + if in == nil { + return nil + } + out := new(RoleLastUsedObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleLastUsedParameters) DeepCopyInto(out *RoleLastUsedParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleLastUsedParameters. +func (in *RoleLastUsedParameters) DeepCopy() *RoleLastUsedParameters { + if in == nil { + return nil + } + out := new(RoleLastUsedParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleList) DeepCopyInto(out *RoleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Role, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList. +func (in *RoleList) DeepCopy() *RoleList { + if in == nil { + return nil + } + out := new(RoleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RoleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleObservation) DeepCopyInto(out *RoleObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.AssumeRolePolicy != nil { + in, out := &in.AssumeRolePolicy, &out.AssumeRolePolicy + *out = new(string) + **out = **in + } + if in.CreateDate != nil { + in, out := &in.CreateDate, &out.CreateDate + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceDetachPolicies != nil { + in, out := &in.ForceDetachPolicies, &out.ForceDetachPolicies + *out = new(bool) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.InlinePolicy != nil { + in, out := &in.InlinePolicy, &out.InlinePolicy + *out = make([]InlinePolicyObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ManagedPolicyArns != nil { + in, out := &in.ManagedPolicyArns, &out.ManagedPolicyArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.MaxSessionDuration != nil { + in, out := &in.MaxSessionDuration, &out.MaxSessionDuration + *out = new(float64) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } + if in.PermissionsBoundary != nil { + in, out := &in.PermissionsBoundary, &out.PermissionsBoundary + *out = new(string) + **out = **in + } + if in.RoleLastUsed != nil { + in, out := &in.RoleLastUsed, &out.RoleLastUsed + *out = make([]RoleLastUsedObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.UniqueID != nil { + in, out := &in.UniqueID, &out.UniqueID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleObservation. +func (in *RoleObservation) DeepCopy() *RoleObservation { + if in == nil { + return nil + } + out := new(RoleObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleParameters) DeepCopyInto(out *RoleParameters) { + *out = *in + if in.AssumeRolePolicy != nil { + in, out := &in.AssumeRolePolicy, &out.AssumeRolePolicy + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceDetachPolicies != nil { + in, out := &in.ForceDetachPolicies, &out.ForceDetachPolicies + *out = new(bool) + **out = **in + } + if in.InlinePolicy != nil { + in, out := &in.InlinePolicy, &out.InlinePolicy + *out = make([]InlinePolicyParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ManagedPolicyArns != nil { + in, out := &in.ManagedPolicyArns, &out.ManagedPolicyArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.MaxSessionDuration != nil { + in, out := &in.MaxSessionDuration, &out.MaxSessionDuration + *out = new(float64) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } + if in.PermissionsBoundary != nil { + in, out := &in.PermissionsBoundary, &out.PermissionsBoundary + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleParameters. +func (in *RoleParameters) DeepCopy() *RoleParameters { + if in == nil { + return nil + } + out := new(RoleParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleSpec) DeepCopyInto(out *RoleSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleSpec. +func (in *RoleSpec) DeepCopy() *RoleSpec { + if in == nil { + return nil + } + out := new(RoleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleStatus) DeepCopyInto(out *RoleStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleStatus. +func (in *RoleStatus) DeepCopy() *RoleStatus { + if in == nil { + return nil + } + out := new(RoleStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/iam/v1alpha1/zz_generated.managed.go b/apis/iam/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..bcb7f61 --- /dev/null +++ b/apis/iam/v1alpha1/zz_generated.managed.go @@ -0,0 +1,68 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Role. +func (mg *Role) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Role. +func (mg *Role) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Role. +func (mg *Role) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Role. +func (mg *Role) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Role. +func (mg *Role) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Role. +func (mg *Role) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Role. +func (mg *Role) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Role. +func (mg *Role) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Role. +func (mg *Role) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Role. +func (mg *Role) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Role. +func (mg *Role) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Role. +func (mg *Role) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/iam/v1alpha1/zz_generated.managedlist.go b/apis/iam/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..68ec0c7 --- /dev/null +++ b/apis/iam/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,17 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this RoleList. +func (l *RoleList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/iam/v1alpha1/zz_generated_terraformed.go b/apis/iam/v1alpha1/zz_generated_terraformed.go new file mode 100755 index 0000000..77d2e90 --- /dev/null +++ b/apis/iam/v1alpha1/zz_generated_terraformed.go @@ -0,0 +1,134 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Role +func (mg *Role) GetTerraformResourceType() string { + return "aws_iam_role" +} + +// GetConnectionDetailsMapping for this Role +func (tr *Role) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Role +func (tr *Role) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Role +func (tr *Role) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Role +func (tr *Role) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Role +func (tr *Role) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Role +func (tr *Role) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Role +func (tr *Role) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Role +func (tr *Role) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Role using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Role) LateInitialize(attrs []byte) (bool, error) { + params := &RoleParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("ManagedPolicyArns")) + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Role) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/iam/v1alpha1/zz_groupversion_info.go b/apis/iam/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..29e4d4d --- /dev/null +++ b/apis/iam/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=iam.aws.kubedb.com +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "iam.aws.kubedb.com" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/iam/v1alpha1/zz_role_types.go b/apis/iam/v1alpha1/zz_role_types.go new file mode 100755 index 0000000..0eb00d5 --- /dev/null +++ b/apis/iam/v1alpha1/zz_role_types.go @@ -0,0 +1,245 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type InlinePolicyInitParameters struct { + + // Friendly name of the role. See IAM Identifiers for more information. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Policy document as a JSON formatted string. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` +} + +type InlinePolicyObservation struct { + + // Friendly name of the role. See IAM Identifiers for more information. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Policy document as a JSON formatted string. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` +} + +type InlinePolicyParameters struct { + + // Friendly name of the role. See IAM Identifiers for more information. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Policy document as a JSON formatted string. + // +kubebuilder:validation:Optional + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` +} + +type RoleInitParameters struct { + + // Policy that grants an entity permission to assume the role. + AssumeRolePolicy *string `json:"assumeRolePolicy,omitempty" tf:"assume_role_policy,omitempty"` + + // Description of the role. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Whether to force detaching any policies the role has before destroying it. Defaults to false. + ForceDetachPolicies *bool `json:"forceDetachPolicies,omitempty" tf:"force_detach_policies,omitempty"` + + // Configuration block defining an exclusive set of IAM inline policies associated with the IAM role. See below. If no blocks are configured, Crossplane will not manage any inline policies in this resource. Configuring one empty block (i.e., inline_policy {}) will cause Crossplane to remove all inline policies added out of band on apply. + InlinePolicy []InlinePolicyInitParameters `json:"inlinePolicy,omitempty" tf:"inline_policy,omitempty"` + + // Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is not configured, Crossplane will ignore policy attachments to this resource. When configured, Crossplane will align the role's managed policy attachments with this set by attaching or detaching managed policies. Configuring an empty set (i.e., managed_policy_arns = []) will cause Crossplane to remove all managed policy attachments. + ManagedPolicyArns []*string `json:"managedPolicyArns,omitempty" tf:"managed_policy_arns,omitempty"` + + // Maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. + MaxSessionDuration *float64 `json:"maxSessionDuration,omitempty" tf:"max_session_duration,omitempty"` + + // Path to the role. See IAM Identifiers for more information. + Path *string `json:"path,omitempty" tf:"path,omitempty"` + + // ARN of the policy that is used to set the permissions boundary for the role. + PermissionsBoundary *string `json:"permissionsBoundary,omitempty" tf:"permissions_boundary,omitempty"` + + // Key-value mapping of tags for the IAM role. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type RoleLastUsedInitParameters struct { +} + +type RoleLastUsedObservation struct { + LastUsedDate *string `json:"lastUsedDate,omitempty" tf:"last_used_date,omitempty"` + + // The name of the AWS Region in which the role was last used. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type RoleLastUsedParameters struct { +} + +type RoleObservation struct { + + // Amazon Resource Name (ARN) specifying the role. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Policy that grants an entity permission to assume the role. + AssumeRolePolicy *string `json:"assumeRolePolicy,omitempty" tf:"assume_role_policy,omitempty"` + + // Creation date of the IAM role. + CreateDate *string `json:"createDate,omitempty" tf:"create_date,omitempty"` + + // Description of the role. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Whether to force detaching any policies the role has before destroying it. Defaults to false. + ForceDetachPolicies *bool `json:"forceDetachPolicies,omitempty" tf:"force_detach_policies,omitempty"` + + // Name of the role. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Configuration block defining an exclusive set of IAM inline policies associated with the IAM role. See below. If no blocks are configured, Crossplane will not manage any inline policies in this resource. Configuring one empty block (i.e., inline_policy {}) will cause Crossplane to remove all inline policies added out of band on apply. + InlinePolicy []InlinePolicyObservation `json:"inlinePolicy,omitempty" tf:"inline_policy,omitempty"` + + // Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is not configured, Crossplane will ignore policy attachments to this resource. When configured, Crossplane will align the role's managed policy attachments with this set by attaching or detaching managed policies. Configuring an empty set (i.e., managed_policy_arns = []) will cause Crossplane to remove all managed policy attachments. + ManagedPolicyArns []*string `json:"managedPolicyArns,omitempty" tf:"managed_policy_arns,omitempty"` + + // Maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. + MaxSessionDuration *float64 `json:"maxSessionDuration,omitempty" tf:"max_session_duration,omitempty"` + + // Path to the role. See IAM Identifiers for more information. + Path *string `json:"path,omitempty" tf:"path,omitempty"` + + // ARN of the policy that is used to set the permissions boundary for the role. + PermissionsBoundary *string `json:"permissionsBoundary,omitempty" tf:"permissions_boundary,omitempty"` + + // Contains information about the last time that an IAM role was used. See role_last_used for details. + RoleLastUsed []RoleLastUsedObservation `json:"roleLastUsed,omitempty" tf:"role_last_used,omitempty"` + + // Key-value mapping of tags for the IAM role. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Stable and unique string identifying the role. + UniqueID *string `json:"uniqueId,omitempty" tf:"unique_id,omitempty"` +} + +type RoleParameters struct { + + // Policy that grants an entity permission to assume the role. + // +kubebuilder:validation:Optional + AssumeRolePolicy *string `json:"assumeRolePolicy,omitempty" tf:"assume_role_policy,omitempty"` + + // Description of the role. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Whether to force detaching any policies the role has before destroying it. Defaults to false. + // +kubebuilder:validation:Optional + ForceDetachPolicies *bool `json:"forceDetachPolicies,omitempty" tf:"force_detach_policies,omitempty"` + + // Configuration block defining an exclusive set of IAM inline policies associated with the IAM role. See below. If no blocks are configured, Crossplane will not manage any inline policies in this resource. Configuring one empty block (i.e., inline_policy {}) will cause Crossplane to remove all inline policies added out of band on apply. + // +kubebuilder:validation:Optional + InlinePolicy []InlinePolicyParameters `json:"inlinePolicy,omitempty" tf:"inline_policy,omitempty"` + + // Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is not configured, Crossplane will ignore policy attachments to this resource. When configured, Crossplane will align the role's managed policy attachments with this set by attaching or detaching managed policies. Configuring an empty set (i.e., managed_policy_arns = []) will cause Crossplane to remove all managed policy attachments. + // +kubebuilder:validation:Optional + ManagedPolicyArns []*string `json:"managedPolicyArns,omitempty" tf:"managed_policy_arns,omitempty"` + + // Maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. + // +kubebuilder:validation:Optional + MaxSessionDuration *float64 `json:"maxSessionDuration,omitempty" tf:"max_session_duration,omitempty"` + + // Path to the role. See IAM Identifiers for more information. + // +kubebuilder:validation:Optional + Path *string `json:"path,omitempty" tf:"path,omitempty"` + + // ARN of the policy that is used to set the permissions boundary for the role. + // +kubebuilder:validation:Optional + PermissionsBoundary *string `json:"permissionsBoundary,omitempty" tf:"permissions_boundary,omitempty"` + + // Key-value mapping of tags for the IAM role. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +// RoleSpec defines the desired state of Role +type RoleSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider RoleParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 RoleInitParameters `json:"initProvider,omitempty"` +} + +// RoleStatus defines the observed state of Role. +type RoleStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider RoleObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Role is the Schema for the Roles API. Provides an IAM role. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type Role 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.assumeRolePolicy) || (has(self.initProvider) && has(self.initProvider.assumeRolePolicy))",message="spec.forProvider.assumeRolePolicy is a required parameter" + Spec RoleSpec `json:"spec"` + Status RoleStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RoleList contains a list of Roles +type RoleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Role `json:"items"` +} + +// Repository type metadata. +var ( + Role_Kind = "Role" + Role_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Role_Kind}.String() + Role_KindAPIVersion = Role_Kind + "." + CRDGroupVersion.String() + Role_GroupVersionKind = CRDGroupVersion.WithKind(Role_Kind) +) + +func init() { + SchemeBuilder.Register(&Role{}, &RoleList{}) +} diff --git a/apis/kafka/v1alpha1/zz_cluster_types.go b/apis/kafka/v1alpha1/zz_cluster_types.go index d69e14a..ae7d693 100755 --- a/apis/kafka/v1alpha1/zz_cluster_types.go +++ b/apis/kafka/v1alpha1/zz_cluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,14 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type BrokerLogsInitParameters struct { + CloudwatchLogs []CloudwatchLogsInitParameters `json:"cloudwatchLogs,omitempty" tf:"cloudwatch_logs,omitempty"` + + Firehose []FirehoseInitParameters `json:"firehose,omitempty" tf:"firehose,omitempty"` + + S3 []S3InitParameters `json:"s3,omitempty" tf:"s3,omitempty"` +} + type BrokerLogsObservation struct { CloudwatchLogs []CloudwatchLogsObservation `json:"cloudwatchLogs,omitempty" tf:"cloudwatch_logs,omitempty"` @@ -33,6 +45,21 @@ type BrokerLogsParameters struct { S3 []S3Parameters `json:"s3,omitempty" tf:"s3,omitempty"` } +type BrokerNodeGroupInfoInitParameters struct { + + // The distribution of broker nodes across availability zones (documentation). Currently the only valid value is DEFAULT. + AzDistribution *string `json:"azDistribution,omitempty" tf:"az_distribution,omitempty"` + + // Information about the cluster access configuration. See below. For security reasons, you can't turn on public access while creating an MSK cluster. However, you can update an existing cluster to make it publicly accessible. You can also create a new cluster and then update it to make it publicly accessible (documentation). + ConnectivityInfo []ConnectivityInfoInitParameters `json:"connectivityInfo,omitempty" tf:"connectivity_info,omitempty"` + + // Specify the instance type to use for the kafka brokersE.g., kafka.m5.large. (Pricing info) + InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + + // A block that contains information about storage volumes attached to MSK broker nodes. See below. + StorageInfo []StorageInfoInitParameters `json:"storageInfo,omitempty" tf:"storage_info,omitempty"` +} + type BrokerNodeGroupInfoObservation struct { // The distribution of broker nodes across availability zones (documentation). Currently the only valid value is DEFAULT. @@ -61,7 +88,7 @@ type BrokerNodeGroupInfoParameters struct { AzDistribution *string `json:"azDistribution,omitempty" tf:"az_distribution,omitempty"` // A list of subnets to connect to in client VPC (documentation). - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet // +kubebuilder:validation:Optional ClientSubnets []*string `json:"clientSubnets,omitempty" tf:"client_subnets,omitempty"` @@ -78,11 +105,11 @@ type BrokerNodeGroupInfoParameters struct { ConnectivityInfo []ConnectivityInfoParameters `json:"connectivityInfo,omitempty" tf:"connectivity_info,omitempty"` // Specify the instance type to use for the kafka brokersE.g., kafka.m5.large. (Pricing info) - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional InstanceType *string `json:"instanceType" tf:"instance_type,omitempty"` // A list of the security groups to associate with the elastic network interfaces to control who can communicate with the cluster. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup // +kubebuilder:validation:Optional SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"` @@ -99,6 +126,18 @@ type BrokerNodeGroupInfoParameters struct { StorageInfo []StorageInfoParameters `json:"storageInfo,omitempty" tf:"storage_info,omitempty"` } +type ClientAuthenticationInitParameters struct { + + // Configuration block for specifying SASL client authentication. See below. + Sasl []SaslInitParameters `json:"sasl,omitempty" tf:"sasl,omitempty"` + + // Configuration block for specifying TLS client authentication. See below. + TLS []TLSInitParameters `json:"tls,omitempty" tf:"tls,omitempty"` + + // Enables unauthenticated access. + Unauthenticated *bool `json:"unauthenticated,omitempty" tf:"unauthenticated,omitempty"` +} + type ClientAuthenticationObservation struct { // Configuration block for specifying SASL client authentication. See below. @@ -126,6 +165,15 @@ type ClientAuthenticationParameters struct { Unauthenticated *bool `json:"unauthenticated,omitempty" tf:"unauthenticated,omitempty"` } +type CloudwatchLogsInitParameters struct { + + // Controls whether provisioned throughput is enabled or not. Default value: false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Name of the Cloudwatch Log Group to deliver logs to. + LogGroup *string `json:"logGroup,omitempty" tf:"log_group,omitempty"` +} + type CloudwatchLogsObservation struct { // Controls whether provisioned throughput is enabled or not. Default value: false. @@ -138,21 +186,54 @@ type CloudwatchLogsObservation struct { type CloudwatchLogsParameters struct { // Controls whether provisioned throughput is enabled or not. Default value: false. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // Name of the Cloudwatch Log Group to deliver logs to. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/cloudwatchlogs/v1beta1.Group // +kubebuilder:validation:Optional LogGroup *string `json:"logGroup,omitempty" tf:"log_group,omitempty"` +} - // Reference to a Group in cloudwatchlogs to populate logGroup. - // +kubebuilder:validation:Optional - LogGroupRef *v1.Reference `json:"logGroupRef,omitempty" tf:"-"` +type ClusterInitParameters struct { - // Selector for a Group in cloudwatchlogs to populate logGroup. - // +kubebuilder:validation:Optional - LogGroupSelector *v1.Selector `json:"logGroupSelector,omitempty" tf:"-"` + // Configuration block for the broker nodes of the Kafka cluster. + BrokerNodeGroupInfo []BrokerNodeGroupInfoInitParameters `json:"brokerNodeGroupInfo,omitempty" tf:"broker_node_group_info,omitempty"` + + // Configuration block for specifying a client authentication. See below. + ClientAuthentication []ClientAuthenticationInitParameters `json:"clientAuthentication,omitempty" tf:"client_authentication,omitempty"` + + // Name of the MSK cluster. + ClusterName *string `json:"clusterName,omitempty" tf:"cluster_name,omitempty"` + + // Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below. + ConfigurationInfo []ConfigurationInfoInitParameters `json:"configurationInfo,omitempty" tf:"configuration_info,omitempty"` + + // Configuration block for specifying encryption. See below. + EncryptionInfo []EncryptionInfoInitParameters `json:"encryptionInfo,omitempty" tf:"encryption_info,omitempty"` + + // Specify the desired enhanced MSK CloudWatch monitoring level. See Monitoring Amazon MSK with Amazon CloudWatch + EnhancedMonitoring *string `json:"enhancedMonitoring,omitempty" tf:"enhanced_monitoring,omitempty"` + + // Specify the desired Kafka software version. + KafkaVersion *string `json:"kafkaVersion,omitempty" tf:"kafka_version,omitempty"` + + // Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below. + LoggingInfo []LoggingInfoInitParameters `json:"loggingInfo,omitempty" tf:"logging_info,omitempty"` + + // The desired total number of broker nodes in the kafka cluster. It must be a multiple of the number of specified client subnets. + NumberOfBrokerNodes *float64 `json:"numberOfBrokerNodes,omitempty" tf:"number_of_broker_nodes,omitempty"` + + // Configuration block for JMX and Node monitoring for the MSK cluster. See below. + OpenMonitoring []OpenMonitoringInitParameters `json:"openMonitoring,omitempty" tf:"open_monitoring,omitempty"` + + // Controls storage mode for supported storage tiers. Valid values are: LOCAL or TIERED. + StorageMode *string `json:"storageMode,omitempty" tf:"storage_mode,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } type ClusterObservation struct { @@ -292,6 +373,15 @@ type ClusterParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ConfigurationInfoInitParameters struct { + + // Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Revision of the MSK Configuration to use in the cluster. + Revision *float64 `json:"revision,omitempty" tf:"revision,omitempty"` +} + type ConfigurationInfoObservation struct { // Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster. @@ -304,14 +394,20 @@ type ConfigurationInfoObservation struct { type ConfigurationInfoParameters struct { // Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Arn *string `json:"arn" tf:"arn,omitempty"` // Revision of the MSK Configuration to use in the cluster. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Revision *float64 `json:"revision" tf:"revision,omitempty"` } +type ConnectivityInfoInitParameters struct { + + // Access control settings for brokers. See below. + PublicAccess []PublicAccessInitParameters `json:"publicAccess,omitempty" tf:"public_access,omitempty"` +} + type ConnectivityInfoObservation struct { // Access control settings for brokers. See below. @@ -325,6 +421,15 @@ type ConnectivityInfoParameters struct { PublicAccess []PublicAccessParameters `json:"publicAccess,omitempty" tf:"public_access,omitempty"` } +type EBSStorageInfoInitParameters struct { + + // A block that contains EBS volume provisioned throughput information. To provision storage throughput, you must choose broker type kafka.m5.4xlarge or larger. See below. + ProvisionedThroughput []ProvisionedThroughputInitParameters `json:"provisionedThroughput,omitempty" tf:"provisioned_throughput,omitempty"` + + // The size in GiB of the EBS volume for the data drive on each broker node. Minimum value of 1 and maximum value of 16384. + VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"` +} + type EBSStorageInfoObservation struct { // A block that contains EBS volume provisioned throughput information. To provision storage throughput, you must choose broker type kafka.m5.4xlarge or larger. See below. @@ -345,6 +450,15 @@ type EBSStorageInfoParameters struct { VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"` } +type EncryptionInTransitInitParameters struct { + + // Encryption setting for data in transit between clients and brokers. Valid values: TLS, TLS_PLAINTEXT, and PLAINTEXT. Default value is TLS. + ClientBroker *string `json:"clientBroker,omitempty" tf:"client_broker,omitempty"` + + // Whether data communication among broker nodes is encrypted. Default value: true. + InCluster *bool `json:"inCluster,omitempty" tf:"in_cluster,omitempty"` +} + type EncryptionInTransitObservation struct { // Encryption setting for data in transit between clients and brokers. Valid values: TLS, TLS_PLAINTEXT, and PLAINTEXT. Default value is TLS. @@ -365,6 +479,12 @@ type EncryptionInTransitParameters struct { InCluster *bool `json:"inCluster,omitempty" tf:"in_cluster,omitempty"` } +type EncryptionInfoInitParameters struct { + + // Configuration block to specify encryption in transit. See below. + EncryptionInTransit []EncryptionInTransitInitParameters `json:"encryptionInTransit,omitempty" tf:"encryption_in_transit,omitempty"` +} + type EncryptionInfoObservation struct { // The ARN of the KMS key used for encryption at rest of the broker data volumes. @@ -377,8 +497,8 @@ type EncryptionInfoObservation struct { type EncryptionInfoParameters struct { // The ARN of the KMS key used for encryption at rest of the broker data volumes. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key - // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional EncryptionAtRestKMSKeyArn *string `json:"encryptionAtRestKmsKeyArn,omitempty" tf:"encryption_at_rest_kms_key_arn,omitempty"` @@ -395,6 +515,15 @@ type EncryptionInfoParameters struct { EncryptionInTransit []EncryptionInTransitParameters `json:"encryptionInTransit,omitempty" tf:"encryption_in_transit,omitempty"` } +type FirehoseInitParameters struct { + + // Name of the Kinesis Data Firehose delivery stream to deliver logs to. + DeliveryStream *string `json:"deliveryStream,omitempty" tf:"delivery_stream,omitempty"` + + // Controls whether provisioned throughput is enabled or not. Default value: false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type FirehoseObservation struct { // Name of the Kinesis Data Firehose delivery stream to deliver logs to. @@ -411,10 +540,16 @@ type FirehoseParameters struct { DeliveryStream *string `json:"deliveryStream,omitempty" tf:"delivery_stream,omitempty"` // Controls whether provisioned throughput is enabled or not. Default value: false. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` } +type JmxExporterInitParameters struct { + + // Indicates whether you want to enable or disable the JMX Exporter. + EnabledInBroker *bool `json:"enabledInBroker,omitempty" tf:"enabled_in_broker,omitempty"` +} + type JmxExporterObservation struct { // Indicates whether you want to enable or disable the JMX Exporter. @@ -424,10 +559,16 @@ type JmxExporterObservation struct { type JmxExporterParameters struct { // Indicates whether you want to enable or disable the JMX Exporter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional EnabledInBroker *bool `json:"enabledInBroker" tf:"enabled_in_broker,omitempty"` } +type LoggingInfoInitParameters struct { + + // Configuration block for Broker Logs settings for logging info. See below. + BrokerLogs []BrokerLogsInitParameters `json:"brokerLogs,omitempty" tf:"broker_logs,omitempty"` +} + type LoggingInfoObservation struct { // Configuration block for Broker Logs settings for logging info. See below. @@ -437,10 +578,16 @@ type LoggingInfoObservation struct { type LoggingInfoParameters struct { // Configuration block for Broker Logs settings for logging info. See below. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional BrokerLogs []BrokerLogsParameters `json:"brokerLogs" tf:"broker_logs,omitempty"` } +type NodeExporterInitParameters struct { + + // Indicates whether you want to enable or disable the JMX Exporter. + EnabledInBroker *bool `json:"enabledInBroker,omitempty" tf:"enabled_in_broker,omitempty"` +} + type NodeExporterObservation struct { // Indicates whether you want to enable or disable the JMX Exporter. @@ -450,10 +597,16 @@ type NodeExporterObservation struct { type NodeExporterParameters struct { // Indicates whether you want to enable or disable the JMX Exporter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional EnabledInBroker *bool `json:"enabledInBroker" tf:"enabled_in_broker,omitempty"` } +type OpenMonitoringInitParameters struct { + + // Configuration block for Prometheus settings for open monitoring. See below. + Prometheus []PrometheusInitParameters `json:"prometheus,omitempty" tf:"prometheus,omitempty"` +} + type OpenMonitoringObservation struct { // Configuration block for Prometheus settings for open monitoring. See below. @@ -463,10 +616,19 @@ type OpenMonitoringObservation struct { type OpenMonitoringParameters struct { // Configuration block for Prometheus settings for open monitoring. See below. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Prometheus []PrometheusParameters `json:"prometheus" tf:"prometheus,omitempty"` } +type PrometheusInitParameters struct { + + // Configuration block for JMX Exporter. See below. + JmxExporter []JmxExporterInitParameters `json:"jmxExporter,omitempty" tf:"jmx_exporter,omitempty"` + + // Configuration block for Node Exporter. See below. + NodeExporter []NodeExporterInitParameters `json:"nodeExporter,omitempty" tf:"node_exporter,omitempty"` +} + type PrometheusObservation struct { // Configuration block for JMX Exporter. See below. @@ -487,6 +649,15 @@ type PrometheusParameters struct { NodeExporter []NodeExporterParameters `json:"nodeExporter,omitempty" tf:"node_exporter,omitempty"` } +type ProvisionedThroughputInitParameters struct { + + // Controls whether provisioned throughput is enabled or not. Default value: false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Throughput value of the EBS volumes for the data drive on each kafka broker node in MiB per second. The minimum value is 250. The maximum value varies between broker type. You can refer to the valid values for the maximum volume throughput at the following documentation on throughput bottlenecks + VolumeThroughput *float64 `json:"volumeThroughput,omitempty" tf:"volume_throughput,omitempty"` +} + type ProvisionedThroughputObservation struct { // Controls whether provisioned throughput is enabled or not. Default value: false. @@ -507,6 +678,12 @@ type ProvisionedThroughputParameters struct { VolumeThroughput *float64 `json:"volumeThroughput,omitempty" tf:"volume_throughput,omitempty"` } +type PublicAccessInitParameters struct { + + // Public access type. Valida values: DISABLED, SERVICE_PROVIDED_EIPS. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + type PublicAccessObservation struct { // Public access type. Valida values: DISABLED, SERVICE_PROVIDED_EIPS. @@ -520,7 +697,7 @@ type PublicAccessParameters struct { Type *string `json:"type,omitempty" tf:"type,omitempty"` } -type S3Observation struct { +type S3InitParameters struct { // Name of the S3 bucket to deliver logs to. Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` @@ -532,23 +709,26 @@ type S3Observation struct { Prefix *string `json:"prefix,omitempty" tf:"prefix,omitempty"` } -type S3Parameters struct { +type S3Observation struct { // Name of the S3 bucket to deliver logs to. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket - // +kubebuilder:validation:Optional Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` - // Reference to a Bucket in s3 to populate bucket. - // +kubebuilder:validation:Optional - BucketRef *v1.Reference `json:"bucketRef,omitempty" tf:"-"` + // Controls whether provisioned throughput is enabled or not. Default value: false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // Prefix to append to the folder name. + Prefix *string `json:"prefix,omitempty" tf:"prefix,omitempty"` +} + +type S3Parameters struct { - // Selector for a Bucket in s3 to populate bucket. + // Name of the S3 bucket to deliver logs to. // +kubebuilder:validation:Optional - BucketSelector *v1.Selector `json:"bucketSelector,omitempty" tf:"-"` + Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` // Controls whether provisioned throughput is enabled or not. Default value: false. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // Prefix to append to the folder name. @@ -556,6 +736,15 @@ type S3Parameters struct { Prefix *string `json:"prefix,omitempty" tf:"prefix,omitempty"` } +type SaslInitParameters struct { + + // Enables IAM client authentication. Defaults to false. + IAM *bool `json:"iam,omitempty" tf:"iam,omitempty"` + + // Enables SCRAM client authentication via AWS Secrets Manager. Defaults to false. + Scram *bool `json:"scram,omitempty" tf:"scram,omitempty"` +} + type SaslObservation struct { // Enables IAM client authentication. Defaults to false. @@ -576,6 +765,12 @@ type SaslParameters struct { Scram *bool `json:"scram,omitempty" tf:"scram,omitempty"` } +type StorageInfoInitParameters struct { + + // A block that contains EBS volume information. See below. + EBSStorageInfo []EBSStorageInfoInitParameters `json:"ebsStorageInfo,omitempty" tf:"ebs_storage_info,omitempty"` +} + type StorageInfoObservation struct { // A block that contains EBS volume information. See below. @@ -589,6 +784,12 @@ type StorageInfoParameters struct { EBSStorageInfo []EBSStorageInfoParameters `json:"ebsStorageInfo,omitempty" tf:"ebs_storage_info,omitempty"` } +type TLSInitParameters struct { + + // List of ACM Certificate Authority Amazon Resource Names (ARNs). + CertificateAuthorityArns []*string `json:"certificateAuthorityArns,omitempty" tf:"certificate_authority_arns,omitempty"` +} + type TLSObservation struct { // List of ACM Certificate Authority Amazon Resource Names (ARNs). @@ -606,6 +807,17 @@ type TLSParameters struct { type ClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInitParameters `json:"initProvider,omitempty"` } // ClusterStatus defines the observed state of Cluster. @@ -626,11 +838,11 @@ type ClusterStatus struct { type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.brokerNodeGroupInfo)",message="brokerNodeGroupInfo is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterName)",message="clusterName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.kafkaVersion)",message="kafkaVersion is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.numberOfBrokerNodes)",message="numberOfBrokerNodes is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.brokerNodeGroupInfo) || (has(self.initProvider) && has(self.initProvider.brokerNodeGroupInfo))",message="spec.forProvider.brokerNodeGroupInfo is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.clusterName) || (has(self.initProvider) && has(self.initProvider.clusterName))",message="spec.forProvider.clusterName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.kafkaVersion) || (has(self.initProvider) && has(self.initProvider.kafkaVersion))",message="spec.forProvider.kafkaVersion is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.numberOfBrokerNodes) || (has(self.initProvider) && has(self.initProvider.numberOfBrokerNodes))",message="spec.forProvider.numberOfBrokerNodes is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status,omitempty"` } diff --git a/apis/kafka/v1alpha1/zz_configuration_types.go b/apis/kafka/v1alpha1/zz_configuration_types.go index 9e80a33..cad06cb 100755 --- a/apis/kafka/v1alpha1/zz_configuration_types.go +++ b/apis/kafka/v1alpha1/zz_configuration_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,21 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ConfigurationInitParameters struct { + + // Description of the configuration. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // List of Apache Kafka versions which can use this configuration. + KafkaVersions []*string `json:"kafkaVersions,omitempty" tf:"kafka_versions,omitempty"` + + // Name of the configuration. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Contents of the server.properties file. Supported properties are documented in the MSK Developer Guide. + ServerProperties *string `json:"serverProperties,omitempty" tf:"server_properties,omitempty"` +} + type ConfigurationObservation struct { // Amazon Resource Name (ARN) of the configuration. @@ -64,6 +83,17 @@ type ConfigurationParameters struct { type ConfigurationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ConfigurationParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` } // ConfigurationStatus defines the observed state of Configuration. @@ -74,7 +104,7 @@ type ConfigurationStatus struct { // +kubebuilder:object:root=true -// Configuration is the Schema for the Configurations API. Upbound official provider resource for managing an amazon managed streaming for kafka configuration +// Configuration is the Schema for the Configurations API. provider resource for managing an amazon managed streaming for kafka configuration // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" @@ -84,9 +114,9 @@ type ConfigurationStatus struct { type Configuration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.serverProperties)",message="serverProperties is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.serverProperties) || (has(self.initProvider) && has(self.initProvider.serverProperties))",message="spec.forProvider.serverProperties is a required parameter" Spec ConfigurationSpec `json:"spec"` Status ConfigurationStatus `json:"status,omitempty"` } diff --git a/apis/kafka/v1alpha1/zz_generated.deepcopy.go b/apis/kafka/v1alpha1/zz_generated.deepcopy.go index 8a8cf74..7755d89 100644 --- a/apis/kafka/v1alpha1/zz_generated.deepcopy.go +++ b/apis/kafka/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,42 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BrokerLogsInitParameters) DeepCopyInto(out *BrokerLogsInitParameters) { + *out = *in + if in.CloudwatchLogs != nil { + in, out := &in.CloudwatchLogs, &out.CloudwatchLogs + *out = make([]CloudwatchLogsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Firehose != nil { + in, out := &in.Firehose, &out.Firehose + *out = make([]FirehoseInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.S3 != nil { + in, out := &in.S3, &out.S3 + *out = make([]S3InitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerLogsInitParameters. +func (in *BrokerLogsInitParameters) DeepCopy() *BrokerLogsInitParameters { + if in == nil { + return nil + } + out := new(BrokerLogsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BrokerLogsObservation) DeepCopyInto(out *BrokerLogsObservation) { *out = *in @@ -86,6 +121,45 @@ func (in *BrokerLogsParameters) DeepCopy() *BrokerLogsParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BrokerNodeGroupInfoInitParameters) DeepCopyInto(out *BrokerNodeGroupInfoInitParameters) { + *out = *in + if in.AzDistribution != nil { + in, out := &in.AzDistribution, &out.AzDistribution + *out = new(string) + **out = **in + } + if in.ConnectivityInfo != nil { + in, out := &in.ConnectivityInfo, &out.ConnectivityInfo + *out = make([]ConnectivityInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.StorageInfo != nil { + in, out := &in.StorageInfo, &out.StorageInfo + *out = make([]StorageInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerNodeGroupInfoInitParameters. +func (in *BrokerNodeGroupInfoInitParameters) DeepCopy() *BrokerNodeGroupInfoInitParameters { + if in == nil { + return nil + } + out := new(BrokerNodeGroupInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BrokerNodeGroupInfoObservation) DeepCopyInto(out *BrokerNodeGroupInfoObservation) { *out = *in @@ -232,6 +306,40 @@ func (in *BrokerNodeGroupInfoParameters) DeepCopy() *BrokerNodeGroupInfoParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClientAuthenticationInitParameters) DeepCopyInto(out *ClientAuthenticationInitParameters) { + *out = *in + if in.Sasl != nil { + in, out := &in.Sasl, &out.Sasl + *out = make([]SaslInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = make([]TLSInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Unauthenticated != nil { + in, out := &in.Unauthenticated, &out.Unauthenticated + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientAuthenticationInitParameters. +func (in *ClientAuthenticationInitParameters) DeepCopy() *ClientAuthenticationInitParameters { + if in == nil { + return nil + } + out := new(ClientAuthenticationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClientAuthenticationObservation) DeepCopyInto(out *ClientAuthenticationObservation) { *out = *in @@ -300,6 +408,31 @@ func (in *ClientAuthenticationParameters) DeepCopy() *ClientAuthenticationParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CloudwatchLogsInitParameters) DeepCopyInto(out *CloudwatchLogsInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.LogGroup != nil { + in, out := &in.LogGroup, &out.LogGroup + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudwatchLogsInitParameters. +func (in *CloudwatchLogsInitParameters) DeepCopy() *CloudwatchLogsInitParameters { + if in == nil { + return nil + } + out := new(CloudwatchLogsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CloudwatchLogsObservation) DeepCopyInto(out *CloudwatchLogsObservation) { *out = *in @@ -338,16 +471,6 @@ func (in *CloudwatchLogsParameters) DeepCopyInto(out *CloudwatchLogsParameters) *out = new(string) **out = **in } - if in.LogGroupRef != nil { - in, out := &in.LogGroupRef, &out.LogGroupRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.LogGroupSelector != nil { - in, out := &in.LogGroupSelector, &out.LogGroupSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudwatchLogsParameters. @@ -387,6 +510,120 @@ func (in *Cluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitParameters) DeepCopyInto(out *ClusterInitParameters) { + *out = *in + if in.BrokerNodeGroupInfo != nil { + in, out := &in.BrokerNodeGroupInfo, &out.BrokerNodeGroupInfo + *out = make([]BrokerNodeGroupInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = make([]ClientAuthenticationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ClusterName != nil { + in, out := &in.ClusterName, &out.ClusterName + *out = new(string) + **out = **in + } + if in.ConfigurationInfo != nil { + in, out := &in.ConfigurationInfo, &out.ConfigurationInfo + *out = make([]ConfigurationInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EncryptionInfo != nil { + in, out := &in.EncryptionInfo, &out.EncryptionInfo + *out = make([]EncryptionInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnhancedMonitoring != nil { + in, out := &in.EnhancedMonitoring, &out.EnhancedMonitoring + *out = new(string) + **out = **in + } + if in.KafkaVersion != nil { + in, out := &in.KafkaVersion, &out.KafkaVersion + *out = new(string) + **out = **in + } + if in.LoggingInfo != nil { + in, out := &in.LoggingInfo, &out.LoggingInfo + *out = make([]LoggingInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NumberOfBrokerNodes != nil { + in, out := &in.NumberOfBrokerNodes, &out.NumberOfBrokerNodes + *out = new(float64) + **out = **in + } + if in.OpenMonitoring != nil { + in, out := &in.OpenMonitoring, &out.OpenMonitoring + *out = make([]OpenMonitoringInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StorageMode != nil { + in, out := &in.StorageMode, &out.StorageMode + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitParameters. +func (in *ClusterInitParameters) DeepCopy() *ClusterInitParameters { + if in == nil { + return nil + } + out := new(ClusterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterList) DeepCopyInto(out *ClusterList) { *out = *in @@ -547,7 +784,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -562,7 +800,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -674,7 +913,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -689,7 +929,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -713,6 +954,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -770,7 +1012,7 @@ func (in *Configuration) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigurationInfoObservation) DeepCopyInto(out *ConfigurationInfoObservation) { +func (in *ConfigurationInfoInitParameters) DeepCopyInto(out *ConfigurationInfoInitParameters) { *out = *in if in.Arn != nil { in, out := &in.Arn, &out.Arn @@ -784,18 +1026,18 @@ func (in *ConfigurationInfoObservation) DeepCopyInto(out *ConfigurationInfoObser } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInfoObservation. -func (in *ConfigurationInfoObservation) DeepCopy() *ConfigurationInfoObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInfoInitParameters. +func (in *ConfigurationInfoInitParameters) DeepCopy() *ConfigurationInfoInitParameters { if in == nil { return nil } - out := new(ConfigurationInfoObservation) + out := new(ConfigurationInfoInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigurationInfoParameters) DeepCopyInto(out *ConfigurationInfoParameters) { +func (in *ConfigurationInfoObservation) DeepCopyInto(out *ConfigurationInfoObservation) { *out = *in if in.Arn != nil { in, out := &in.Arn, &out.Arn @@ -809,42 +1051,108 @@ func (in *ConfigurationInfoParameters) DeepCopyInto(out *ConfigurationInfoParame } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInfoParameters. -func (in *ConfigurationInfoParameters) DeepCopy() *ConfigurationInfoParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInfoObservation. +func (in *ConfigurationInfoObservation) DeepCopy() *ConfigurationInfoObservation { if in == nil { return nil } - out := new(ConfigurationInfoParameters) + out := new(ConfigurationInfoObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigurationList) DeepCopyInto(out *ConfigurationList) { +func (in *ConfigurationInfoParameters) DeepCopyInto(out *ConfigurationInfoParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Configuration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.Revision != nil { + in, out := &in.Revision, &out.Revision + *out = new(float64) + **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationList. -func (in *ConfigurationList) DeepCopy() *ConfigurationList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInfoParameters. +func (in *ConfigurationInfoParameters) DeepCopy() *ConfigurationInfoParameters { if in == nil { return nil } - out := new(ConfigurationList) + out := new(ConfigurationInfoParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigurationList) DeepCopyObject() runtime.Object { +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigurationInitParameters) DeepCopyInto(out *ConfigurationInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.KafkaVersions != nil { + in, out := &in.KafkaVersions, &out.KafkaVersions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ServerProperties != nil { + in, out := &in.ServerProperties, &out.ServerProperties + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInitParameters. +func (in *ConfigurationInitParameters) DeepCopy() *ConfigurationInitParameters { + if in == nil { + return nil + } + out := new(ConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigurationList) DeepCopyInto(out *ConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Configuration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationList. +func (in *ConfigurationList) DeepCopy() *ConfigurationList { + if in == nil { + return nil + } + out := new(ConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -958,6 +1266,7 @@ func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec. @@ -987,6 +1296,28 @@ func (in *ConfigurationStatus) DeepCopy() *ConfigurationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectivityInfoInitParameters) DeepCopyInto(out *ConnectivityInfoInitParameters) { + *out = *in + if in.PublicAccess != nil { + in, out := &in.PublicAccess, &out.PublicAccess + *out = make([]PublicAccessInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityInfoInitParameters. +func (in *ConnectivityInfoInitParameters) DeepCopy() *ConnectivityInfoInitParameters { + if in == nil { + return nil + } + out := new(ConnectivityInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConnectivityInfoObservation) DeepCopyInto(out *ConnectivityInfoObservation) { *out = *in @@ -1031,6 +1362,33 @@ func (in *ConnectivityInfoParameters) DeepCopy() *ConnectivityInfoParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EBSStorageInfoInitParameters) DeepCopyInto(out *EBSStorageInfoInitParameters) { + *out = *in + if in.ProvisionedThroughput != nil { + in, out := &in.ProvisionedThroughput, &out.ProvisionedThroughput + *out = make([]ProvisionedThroughputInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VolumeSize != nil { + in, out := &in.VolumeSize, &out.VolumeSize + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EBSStorageInfoInitParameters. +func (in *EBSStorageInfoInitParameters) DeepCopy() *EBSStorageInfoInitParameters { + if in == nil { + return nil + } + out := new(EBSStorageInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EBSStorageInfoObservation) DeepCopyInto(out *EBSStorageInfoObservation) { *out = *in @@ -1085,6 +1443,31 @@ func (in *EBSStorageInfoParameters) DeepCopy() *EBSStorageInfoParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionInTransitInitParameters) DeepCopyInto(out *EncryptionInTransitInitParameters) { + *out = *in + if in.ClientBroker != nil { + in, out := &in.ClientBroker, &out.ClientBroker + *out = new(string) + **out = **in + } + if in.InCluster != nil { + in, out := &in.InCluster, &out.InCluster + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionInTransitInitParameters. +func (in *EncryptionInTransitInitParameters) DeepCopy() *EncryptionInTransitInitParameters { + if in == nil { + return nil + } + out := new(EncryptionInTransitInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EncryptionInTransitObservation) DeepCopyInto(out *EncryptionInTransitObservation) { *out = *in @@ -1135,6 +1518,28 @@ func (in *EncryptionInTransitParameters) DeepCopy() *EncryptionInTransitParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionInfoInitParameters) DeepCopyInto(out *EncryptionInfoInitParameters) { + *out = *in + if in.EncryptionInTransit != nil { + in, out := &in.EncryptionInTransit, &out.EncryptionInTransit + *out = make([]EncryptionInTransitInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionInfoInitParameters. +func (in *EncryptionInfoInitParameters) DeepCopy() *EncryptionInfoInitParameters { + if in == nil { + return nil + } + out := new(EncryptionInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EncryptionInfoObservation) DeepCopyInto(out *EncryptionInfoObservation) { *out = *in @@ -1199,6 +1604,31 @@ func (in *EncryptionInfoParameters) DeepCopy() *EncryptionInfoParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirehoseInitParameters) DeepCopyInto(out *FirehoseInitParameters) { + *out = *in + if in.DeliveryStream != nil { + in, out := &in.DeliveryStream, &out.DeliveryStream + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirehoseInitParameters. +func (in *FirehoseInitParameters) DeepCopy() *FirehoseInitParameters { + if in == nil { + return nil + } + out := new(FirehoseInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FirehoseObservation) DeepCopyInto(out *FirehoseObservation) { *out = *in @@ -1249,6 +1679,26 @@ func (in *FirehoseParameters) DeepCopy() *FirehoseParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JmxExporterInitParameters) DeepCopyInto(out *JmxExporterInitParameters) { + *out = *in + if in.EnabledInBroker != nil { + in, out := &in.EnabledInBroker, &out.EnabledInBroker + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JmxExporterInitParameters. +func (in *JmxExporterInitParameters) DeepCopy() *JmxExporterInitParameters { + if in == nil { + return nil + } + out := new(JmxExporterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JmxExporterObservation) DeepCopyInto(out *JmxExporterObservation) { *out = *in @@ -1289,6 +1739,28 @@ func (in *JmxExporterParameters) DeepCopy() *JmxExporterParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoggingInfoInitParameters) DeepCopyInto(out *LoggingInfoInitParameters) { + *out = *in + if in.BrokerLogs != nil { + in, out := &in.BrokerLogs, &out.BrokerLogs + *out = make([]BrokerLogsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingInfoInitParameters. +func (in *LoggingInfoInitParameters) DeepCopy() *LoggingInfoInitParameters { + if in == nil { + return nil + } + out := new(LoggingInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoggingInfoObservation) DeepCopyInto(out *LoggingInfoObservation) { *out = *in @@ -1333,6 +1805,26 @@ func (in *LoggingInfoParameters) DeepCopy() *LoggingInfoParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterInitParameters) DeepCopyInto(out *NodeExporterInitParameters) { + *out = *in + if in.EnabledInBroker != nil { + in, out := &in.EnabledInBroker, &out.EnabledInBroker + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterInitParameters. +func (in *NodeExporterInitParameters) DeepCopy() *NodeExporterInitParameters { + if in == nil { + return nil + } + out := new(NodeExporterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeExporterObservation) DeepCopyInto(out *NodeExporterObservation) { *out = *in @@ -1373,6 +1865,28 @@ func (in *NodeExporterParameters) DeepCopy() *NodeExporterParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenMonitoringInitParameters) DeepCopyInto(out *OpenMonitoringInitParameters) { + *out = *in + if in.Prometheus != nil { + in, out := &in.Prometheus, &out.Prometheus + *out = make([]PrometheusInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenMonitoringInitParameters. +func (in *OpenMonitoringInitParameters) DeepCopy() *OpenMonitoringInitParameters { + if in == nil { + return nil + } + out := new(OpenMonitoringInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenMonitoringObservation) DeepCopyInto(out *OpenMonitoringObservation) { *out = *in @@ -1417,6 +1931,35 @@ func (in *OpenMonitoringParameters) DeepCopy() *OpenMonitoringParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrometheusInitParameters) DeepCopyInto(out *PrometheusInitParameters) { + *out = *in + if in.JmxExporter != nil { + in, out := &in.JmxExporter, &out.JmxExporter + *out = make([]JmxExporterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NodeExporter != nil { + in, out := &in.NodeExporter, &out.NodeExporter + *out = make([]NodeExporterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusInitParameters. +func (in *PrometheusInitParameters) DeepCopy() *PrometheusInitParameters { + if in == nil { + return nil + } + out := new(PrometheusInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrometheusObservation) DeepCopyInto(out *PrometheusObservation) { *out = *in @@ -1475,6 +2018,31 @@ func (in *PrometheusParameters) DeepCopy() *PrometheusParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProvisionedThroughputInitParameters) DeepCopyInto(out *ProvisionedThroughputInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.VolumeThroughput != nil { + in, out := &in.VolumeThroughput, &out.VolumeThroughput + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionedThroughputInitParameters. +func (in *ProvisionedThroughputInitParameters) DeepCopy() *ProvisionedThroughputInitParameters { + if in == nil { + return nil + } + out := new(ProvisionedThroughputInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProvisionedThroughputObservation) DeepCopyInto(out *ProvisionedThroughputObservation) { *out = *in @@ -1525,6 +2093,26 @@ func (in *ProvisionedThroughputParameters) DeepCopy() *ProvisionedThroughputPara return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicAccessInitParameters) DeepCopyInto(out *PublicAccessInitParameters) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicAccessInitParameters. +func (in *PublicAccessInitParameters) DeepCopy() *PublicAccessInitParameters { + if in == nil { + return nil + } + out := new(PublicAccessInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PublicAccessObservation) DeepCopyInto(out *PublicAccessObservation) { *out = *in @@ -1565,6 +2153,36 @@ func (in *PublicAccessParameters) DeepCopy() *PublicAccessParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *S3InitParameters) DeepCopyInto(out *S3InitParameters) { + *out = *in + if in.Bucket != nil { + in, out := &in.Bucket, &out.Bucket + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Prefix != nil { + in, out := &in.Prefix, &out.Prefix + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3InitParameters. +func (in *S3InitParameters) DeepCopy() *S3InitParameters { + if in == nil { + return nil + } + out := new(S3InitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *S3Observation) DeepCopyInto(out *S3Observation) { *out = *in @@ -1603,16 +2221,6 @@ func (in *S3Parameters) DeepCopyInto(out *S3Parameters) { *out = new(string) **out = **in } - if in.BucketRef != nil { - in, out := &in.BucketRef, &out.BucketRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.BucketSelector != nil { - in, out := &in.BucketSelector, &out.BucketSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } if in.Enabled != nil { in, out := &in.Enabled, &out.Enabled *out = new(bool) @@ -1635,6 +2243,31 @@ func (in *S3Parameters) DeepCopy() *S3Parameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SaslInitParameters) DeepCopyInto(out *SaslInitParameters) { + *out = *in + if in.IAM != nil { + in, out := &in.IAM, &out.IAM + *out = new(bool) + **out = **in + } + if in.Scram != nil { + in, out := &in.Scram, &out.Scram + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SaslInitParameters. +func (in *SaslInitParameters) DeepCopy() *SaslInitParameters { + if in == nil { + return nil + } + out := new(SaslInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SaslObservation) DeepCopyInto(out *SaslObservation) { *out = *in @@ -1685,6 +2318,28 @@ func (in *SaslParameters) DeepCopy() *SaslParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageInfoInitParameters) DeepCopyInto(out *StorageInfoInitParameters) { + *out = *in + if in.EBSStorageInfo != nil { + in, out := &in.EBSStorageInfo, &out.EBSStorageInfo + *out = make([]EBSStorageInfoInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageInfoInitParameters. +func (in *StorageInfoInitParameters) DeepCopy() *StorageInfoInitParameters { + if in == nil { + return nil + } + out := new(StorageInfoInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageInfoObservation) DeepCopyInto(out *StorageInfoObservation) { *out = *in @@ -1729,6 +2384,32 @@ func (in *StorageInfoParameters) DeepCopy() *StorageInfoParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLSInitParameters) DeepCopyInto(out *TLSInitParameters) { + *out = *in + if in.CertificateAuthorityArns != nil { + in, out := &in.CertificateAuthorityArns, &out.CertificateAuthorityArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSInitParameters. +func (in *TLSInitParameters) DeepCopy() *TLSInitParameters { + if in == nil { + return nil + } + out := new(TLSInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TLSObservation) DeepCopyInto(out *TLSObservation) { *out = *in diff --git a/apis/kafka/v1alpha1/zz_generated.managed.go b/apis/kafka/v1alpha1/zz_generated.managed.go index 6976bcc..9a18d8a 100644 --- a/apis/kafka/v1alpha1/zz_generated.managed.go +++ b/apis/kafka/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Cluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Cluster. -func (mg *Cluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Cluster. +func (mg *Cluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Cluster. @@ -27,14 +27,6 @@ func (mg *Cluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Cluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Cluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Cluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Cluster. -func (mg *Cluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Cluster. +func (mg *Cluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Cluster. @@ -65,14 +57,6 @@ func (mg *Cluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Cluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Cluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *Configuration) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Configuration. -func (mg *Configuration) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Configuration. +func (mg *Configuration) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Configuration. @@ -103,14 +87,6 @@ func (mg *Configuration) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Configuration. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Configuration) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Configuration. func (mg *Configuration) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *Configuration) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Configuration. -func (mg *Configuration) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Configuration. +func (mg *Configuration) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Configuration. @@ -141,14 +117,6 @@ func (mg *Configuration) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Configuration. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Configuration) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Configuration. func (mg *Configuration) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/kafka/v1alpha1/zz_generated.resolvers.go b/apis/kafka/v1alpha1/zz_generated.resolvers.go index 5d0698a..3380a1a 100644 --- a/apis/kafka/v1alpha1/zz_generated.resolvers.go +++ b/apis/kafka/v1alpha1/zz_generated.resolvers.go @@ -9,11 +9,9 @@ import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" errors "github.com/pkg/errors" - v1beta12 "github.com/upbound/provider-aws/apis/cloudwatchlogs/v1beta1" - v1beta1 "github.com/upbound/provider-aws/apis/ec2/v1beta1" - v1beta11 "github.com/upbound/provider-aws/apis/kms/v1beta1" - v1beta13 "github.com/upbound/provider-aws/apis/s3/v1beta1" - common "github.com/upbound/provider-aws/config/common" + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + v1alpha11 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + common "kubedb.dev/provider-aws/config/common" client "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -32,8 +30,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error References: mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].ClientSubnetsRefs, Selector: mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].ClientSubnetsSelector, To: reference.To{ - List: &v1beta1.SubnetList{}, - Managed: &v1beta1.Subnet{}, + List: &v1alpha1.SubnetList{}, + Managed: &v1alpha1.Subnet{}, }, }) if err != nil { @@ -50,8 +48,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error References: mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].SecurityGroupsRefs, Selector: mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].SecurityGroupsSelector, To: reference.To{ - List: &v1beta1.SecurityGroupList{}, - Managed: &v1beta1.SecurityGroup{}, + List: &v1alpha1.SecurityGroupList{}, + Managed: &v1alpha1.SecurityGroup{}, }, }) if err != nil { @@ -68,8 +66,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error Reference: mg.Spec.ForProvider.EncryptionInfo[i3].EncryptionAtRestKMSKeyArnRef, Selector: mg.Spec.ForProvider.EncryptionInfo[i3].EncryptionAtRestKMSKeyArnSelector, To: reference.To{ - List: &v1beta11.KeyList{}, - Managed: &v1beta11.Key{}, + List: &v1alpha11.KeyList{}, + Managed: &v1alpha11.Key{}, }, }) if err != nil { @@ -79,50 +77,6 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.EncryptionInfo[i3].EncryptionAtRestKMSKeyArnRef = rsp.ResolvedReference } - for i3 := 0; i3 < len(mg.Spec.ForProvider.LoggingInfo); i3++ { - for i4 := 0; i4 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs); i4++ { - for i5 := 0; i5 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs); i5++ { - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroup), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroupRef, - Selector: mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroupSelector, - To: reference.To{ - List: &v1beta12.GroupList{}, - Managed: &v1beta12.Group{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroup") - } - mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroup = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroupRef = rsp.ResolvedReference - - } - } - } - for i3 := 0; i3 < len(mg.Spec.ForProvider.LoggingInfo); i3++ { - for i4 := 0; i4 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs); i4++ { - for i5 := 0; i5 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3); i5++ { - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].Bucket), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].BucketRef, - Selector: mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].BucketSelector, - To: reference.To{ - List: &v1beta13.BucketList{}, - Managed: &v1beta13.Bucket{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].Bucket") - } - mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].Bucket = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].BucketRef = rsp.ResolvedReference - - } - } - } return nil } diff --git a/apis/kafka/v1alpha1/zz_generated_terraformed.go b/apis/kafka/v1alpha1/zz_generated_terraformed.go index 0caa581..841530e 100755 --- a/apis/kafka/v1alpha1/zz_generated_terraformed.go +++ b/apis/kafka/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Cluster @@ -69,6 +74,46 @@ func (tr *Cluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Cluster +func (tr *Cluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Cluster +func (tr *Cluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Cluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Cluster) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *Configuration) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Configuration +func (tr *Configuration) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Configuration +func (tr *Configuration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Configuration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Configuration) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/kafka/v1alpha1/zz_groupversion_info.go b/apis/kafka/v1alpha1/zz_groupversion_info.go index 57abf00..8f97225 100755 --- a/apis/kafka/v1alpha1/zz_groupversion_info.go +++ b/apis/kafka/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/kinesis/v1alpha1/zz_generated.deepcopy.go b/apis/kinesis/v1alpha1/zz_generated.deepcopy.go index b79b542..a84cdea 100644 --- a/apis/kinesis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/kinesis/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -10,6 +9,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -40,6 +40,91 @@ func (in *Stream) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StreamInitParameters) DeepCopyInto(out *StreamInitParameters) { + *out = *in + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(string) + **out = **in + } + if in.EnforceConsumerDeletion != nil { + in, out := &in.EnforceConsumerDeletion, &out.EnforceConsumerDeletion + *out = new(bool) + **out = **in + } + if in.RetentionPeriod != nil { + in, out := &in.RetentionPeriod, &out.RetentionPeriod + *out = new(float64) + **out = **in + } + if in.ShardCount != nil { + in, out := &in.ShardCount, &out.ShardCount + *out = new(float64) + **out = **in + } + if in.ShardLevelMetrics != nil { + in, out := &in.ShardLevelMetrics, &out.ShardLevelMetrics + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.StreamModeDetails != nil { + in, out := &in.StreamModeDetails, &out.StreamModeDetails + *out = make([]StreamModeDetailsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StreamInitParameters. +func (in *StreamInitParameters) DeepCopy() *StreamInitParameters { + if in == nil { + return nil + } + out := new(StreamInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StreamList) DeepCopyInto(out *StreamList) { *out = *in @@ -72,6 +157,26 @@ func (in *StreamList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StreamModeDetailsInitParameters) DeepCopyInto(out *StreamModeDetailsInitParameters) { + *out = *in + if in.StreamMode != nil { + in, out := &in.StreamMode, &out.StreamMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StreamModeDetailsInitParameters. +func (in *StreamModeDetailsInitParameters) DeepCopy() *StreamModeDetailsInitParameters { + if in == nil { + return nil + } + out := new(StreamModeDetailsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StreamModeDetailsObservation) DeepCopyInto(out *StreamModeDetailsObservation) { *out = *in @@ -176,7 +281,8 @@ func (in *StreamObservation) DeepCopyInto(out *StreamObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -191,7 +297,8 @@ func (in *StreamObservation) DeepCopyInto(out *StreamObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -228,6 +335,16 @@ func (in *StreamParameters) DeepCopyInto(out *StreamParameters) { *out = new(string) **out = **in } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -269,7 +386,8 @@ func (in *StreamParameters) DeepCopyInto(out *StreamParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -284,7 +402,8 @@ func (in *StreamParameters) DeepCopyInto(out *StreamParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -308,6 +427,7 @@ func (in *StreamSpec) DeepCopyInto(out *StreamSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StreamSpec. diff --git a/apis/kinesis/v1alpha1/zz_generated.managed.go b/apis/kinesis/v1alpha1/zz_generated.managed.go index d7d7716..e7fad97 100644 --- a/apis/kinesis/v1alpha1/zz_generated.managed.go +++ b/apis/kinesis/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Stream) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Stream. -func (mg *Stream) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Stream. +func (mg *Stream) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Stream. @@ -27,14 +27,6 @@ func (mg *Stream) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Stream. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Stream) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Stream. func (mg *Stream) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Stream) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Stream. -func (mg *Stream) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Stream. +func (mg *Stream) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Stream. @@ -65,14 +57,6 @@ func (mg *Stream) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Stream. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Stream) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Stream. func (mg *Stream) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/kinesis/v1alpha1/zz_generated.resolvers.go b/apis/kinesis/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..23943f1 --- /dev/null +++ b/apis/kinesis/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,40 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Stream. +func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/kinesis/v1alpha1/zz_generated_terraformed.go b/apis/kinesis/v1alpha1/zz_generated_terraformed.go index dcd7948..c42d99c 100755 --- a/apis/kinesis/v1alpha1/zz_generated_terraformed.go +++ b/apis/kinesis/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Stream @@ -69,6 +74,46 @@ func (tr *Stream) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Stream +func (tr *Stream) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Stream +func (tr *Stream) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Stream using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Stream) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/kinesis/v1alpha1/zz_groupversion_info.go b/apis/kinesis/v1alpha1/zz_groupversion_info.go index 12922b3..feba4d4 100755 --- a/apis/kinesis/v1alpha1/zz_groupversion_info.go +++ b/apis/kinesis/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/kinesis/v1alpha1/zz_stream_types.go b/apis/kinesis/v1alpha1/zz_stream_types.go index c4d6350..41dd0b7 100755 --- a/apis/kinesis/v1alpha1/zz_stream_types.go +++ b/apis/kinesis/v1alpha1/zz_stream_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,40 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type StreamInitParameters struct { + + // The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE. + EncryptionType *string `json:"encryptionType,omitempty" tf:"encryption_type,omitempty"` + + // A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false. + EnforceConsumerDeletion *bool `json:"enforceConsumerDeletion,omitempty" tf:"enforce_consumer_deletion,omitempty"` + + // Length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 8760 hours. Minimum value is 24. Default is 24. + RetentionPeriod *float64 `json:"retentionPeriod,omitempty" tf:"retention_period,omitempty"` + + // – The number of shards that the stream will use. If the stream_mode is PROVISIONED, this field is required. + // Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more. + ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` + + // A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable. + ShardLevelMetrics []*string `json:"shardLevelMetrics,omitempty" tf:"shard_level_metrics,omitempty"` + + // Indicates the capacity mode of the data stream. Detailed below. + StreamModeDetails []StreamModeDetailsInitParameters `json:"streamModeDetails,omitempty" tf:"stream_mode_details,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type StreamModeDetailsInitParameters struct { + + // Specifies the capacity mode of the stream. Must be either PROVISIONED or ON_DEMAND. + StreamMode *string `json:"streamMode,omitempty" tf:"stream_mode,omitempty"` +} + type StreamModeDetailsObservation struct { // Specifies the capacity mode of the stream. Must be either PROVISIONED or ON_DEMAND. @@ -22,7 +60,7 @@ type StreamModeDetailsObservation struct { type StreamModeDetailsParameters struct { // Specifies the capacity mode of the stream. Must be either PROVISIONED or ON_DEMAND. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional StreamMode *string `json:"streamMode" tf:"stream_mode,omitempty"` } @@ -74,9 +112,18 @@ type StreamParameters struct { EnforceConsumerDeletion *bool `json:"enforceConsumerDeletion,omitempty" tf:"enforce_consumer_deletion,omitempty"` // The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -112,6 +159,17 @@ type StreamParameters struct { type StreamSpec struct { v1.ResourceSpec `json:",inline"` ForProvider StreamParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 StreamInitParameters `json:"initProvider,omitempty"` } // StreamStatus defines the observed state of Stream. @@ -132,7 +190,7 @@ type StreamStatus struct { type Stream struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec StreamSpec `json:"spec"` Status StreamStatus `json:"status,omitempty"` } diff --git a/apis/kms/v1alpha1/zz_generated.deepcopy.go b/apis/kms/v1alpha1/zz_generated.deepcopy.go index d11cd0f..ff37082 100644 --- a/apis/kms/v1alpha1/zz_generated.deepcopy.go +++ b/apis/kms/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -40,6 +39,103 @@ func (in *Key) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyInitParameters) DeepCopyInto(out *KeyInitParameters) { + *out = *in + if in.BypassPolicyLockoutSafetyCheck != nil { + in, out := &in.BypassPolicyLockoutSafetyCheck, &out.BypassPolicyLockoutSafetyCheck + *out = new(bool) + **out = **in + } + if in.CustomKeyStoreID != nil { + in, out := &in.CustomKeyStoreID, &out.CustomKeyStoreID + *out = new(string) + **out = **in + } + if in.CustomerMasterKeySpec != nil { + in, out := &in.CustomerMasterKeySpec, &out.CustomerMasterKeySpec + *out = new(string) + **out = **in + } + if in.DeletionWindowInDays != nil { + in, out := &in.DeletionWindowInDays, &out.DeletionWindowInDays + *out = new(float64) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnableKeyRotation != nil { + in, out := &in.EnableKeyRotation, &out.EnableKeyRotation + *out = new(bool) + **out = **in + } + if in.IsEnabled != nil { + in, out := &in.IsEnabled, &out.IsEnabled + *out = new(bool) + **out = **in + } + if in.KeyUsage != nil { + in, out := &in.KeyUsage, &out.KeyUsage + *out = new(string) + **out = **in + } + if in.MultiRegion != nil { + in, out := &in.MultiRegion, &out.MultiRegion + *out = new(bool) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyInitParameters. +func (in *KeyInitParameters) DeepCopy() *KeyInitParameters { + if in == nil { + return nil + } + out := new(KeyInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KeyList) DeepCopyInto(out *KeyList) { *out = *in @@ -148,7 +244,8 @@ func (in *KeyObservation) DeepCopyInto(out *KeyObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -163,7 +260,8 @@ func (in *KeyObservation) DeepCopyInto(out *KeyObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -248,7 +346,8 @@ func (in *KeyParameters) DeepCopyInto(out *KeyParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -263,7 +362,8 @@ func (in *KeyParameters) DeepCopyInto(out *KeyParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -287,6 +387,7 @@ func (in *KeySpec) DeepCopyInto(out *KeySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeySpec. diff --git a/apis/kms/v1alpha1/zz_generated.managed.go b/apis/kms/v1alpha1/zz_generated.managed.go index 04e4eeb..e487c1f 100644 --- a/apis/kms/v1alpha1/zz_generated.managed.go +++ b/apis/kms/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Key) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Key. -func (mg *Key) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Key. +func (mg *Key) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Key. @@ -27,14 +27,6 @@ func (mg *Key) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Key. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Key) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Key. func (mg *Key) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Key) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Key. -func (mg *Key) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Key. +func (mg *Key) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Key. @@ -65,14 +57,6 @@ func (mg *Key) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Key. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Key) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Key. func (mg *Key) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/kms/v1alpha1/zz_generated_terraformed.go b/apis/kms/v1alpha1/zz_generated_terraformed.go index 357ddfb..b4a54fa 100755 --- a/apis/kms/v1alpha1/zz_generated_terraformed.go +++ b/apis/kms/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Key @@ -69,6 +74,46 @@ func (tr *Key) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Key +func (tr *Key) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Key +func (tr *Key) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Key using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Key) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/kms/v1alpha1/zz_groupversion_info.go b/apis/kms/v1alpha1/zz_groupversion_info.go index 1cb8cbc..1f2abcb 100755 --- a/apis/kms/v1alpha1/zz_groupversion_info.go +++ b/apis/kms/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/kms/v1alpha1/zz_key_types.go b/apis/kms/v1alpha1/zz_key_types.go index cf4a76f..3d5d039 100755 --- a/apis/kms/v1alpha1/zz_key_types.go +++ b/apis/kms/v1alpha1/zz_key_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,52 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type KeyInitParameters struct { + + // A flag to indicate whether to bypass the key policy lockout safety check. + // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. + // For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. + // The default value is false. + BypassPolicyLockoutSafetyCheck *bool `json:"bypassPolicyLockoutSafetyCheck,omitempty" tf:"bypass_policy_lockout_safety_check,omitempty"` + + // ID of the KMS Custom Key Store where the key will be stored instead of KMS (eg CloudHSM). + CustomKeyStoreID *string `json:"customKeyStoreId,omitempty" tf:"custom_key_store_id,omitempty"` + + // Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. + // Valid values: SYMMETRIC_DEFAULT, RSA_2048, RSA_3072, RSA_4096, HMAC_256, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT. For help with choosing a key spec, see the AWS KMS Developer Guide. + CustomerMasterKeySpec *string `json:"customerMasterKeySpec,omitempty" tf:"customer_master_key_spec,omitempty"` + + // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. + // If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30. + // If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately. + DeletionWindowInDays *float64 `json:"deletionWindowInDays,omitempty" tf:"deletion_window_in_days,omitempty"` + + // The description of the key as viewed in AWS console. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies whether key rotation is enabled. Defaults to false. + EnableKeyRotation *bool `json:"enableKeyRotation,omitempty" tf:"enable_key_rotation,omitempty"` + + // Specifies whether the key is enabled. Defaults to true. + IsEnabled *bool `json:"isEnabled,omitempty" tf:"is_enabled,omitempty"` + + // Specifies the intended use of the key. Valid values: ENCRYPT_DECRYPT, SIGN_VERIFY, or GENERATE_VERIFY_MAC. + // Defaults to ENCRYPT_DECRYPT. + KeyUsage *string `json:"keyUsage,omitempty" tf:"key_usage,omitempty"` + + // Indicates whether the KMS key is a multi-Region (true) or regional (false) key. Defaults to false. + MultiRegion *bool `json:"multiRegion,omitempty" tf:"multi_region,omitempty"` + + // A valid policy JSON document. Although this is a key policy, not an IAM policy, an aws_iam_policy_document, in the form that designates a principal, can be used. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // A map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type KeyObservation struct { // The Amazon Resource Name (ARN) of the key. @@ -134,6 +184,17 @@ type KeyParameters struct { type KeySpec struct { v1.ResourceSpec `json:",inline"` ForProvider KeyParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider KeyInitParameters `json:"initProvider,omitempty"` } // KeyStatus defines the observed state of Key. @@ -154,7 +215,7 @@ type KeyStatus struct { type Key struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec KeySpec `json:"spec"` Status KeyStatus `json:"status,omitempty"` } diff --git a/apis/memorydb/v1alpha1/zz_acl_types.go b/apis/memorydb/v1alpha1/zz_acl_types.go index f54443c..9e8bcb8 100755 --- a/apis/memorydb/v1alpha1/zz_acl_types.go +++ b/apis/memorydb/v1alpha1/zz_acl_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ACLInitParameters struct { + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Set of MemoryDB user names to be included in this ACL. + UserNames []*string `json:"userNames,omitempty" tf:"user_names,omitempty"` +} + type ACLObservation struct { // The ARN of the ACL. @@ -58,6 +74,17 @@ type ACLParameters struct { type ACLSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ACLParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ACLInitParameters `json:"initProvider,omitempty"` } // ACLStatus defines the observed state of ACL. @@ -78,7 +105,7 @@ type ACLStatus struct { type ACL struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ACLSpec `json:"spec"` Status ACLStatus `json:"status,omitempty"` } diff --git a/apis/memorydb/v1alpha1/zz_cluster_types.go b/apis/memorydb/v1alpha1/zz_cluster_types.go index 96bea66..e113015 100755 --- a/apis/memorydb/v1alpha1/zz_cluster_types.go +++ b/apis/memorydb/v1alpha1/zz_cluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,9 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterEndpointInitParameters struct { +} + type ClusterEndpointObservation struct { // DNS hostname of the cluster configuration endpoint. @@ -25,6 +32,69 @@ type ClusterEndpointObservation struct { type ClusterEndpointParameters struct { } +type ClusterInitParameters struct { + + // The name of the Access Control List to associate with the cluster. + ACLName *string `json:"aclName,omitempty" tf:"acl_name,omitempty"` + + // When set to true, the cluster will automatically receive minor engine version upgrades after launch. Defaults to true. + AutoMinorVersionUpgrade *bool `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // Enables data tiering. This option is not supported by all instance types. For more information, see Data tiering. + DataTiering *bool `json:"dataTiering,omitempty" tf:"data_tiering,omitempty"` + + // Description for the cluster. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Version number of the Redis engine to be used for the cluster. Downgrades are not supported. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. + FinalSnapshotName *string `json:"finalSnapshotName,omitempty" tf:"final_snapshot_name,omitempty"` + + // Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: sun:23:00-mon:01:30. + MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + + // The compute and memory capacity of the nodes in the cluster. See AWS documentation on supported node types as well as vertical scaling. + NodeType *string `json:"nodeType,omitempty" tf:"node_type,omitempty"` + + // The number of replicas to apply to each shard, up to a maximum of 5. Defaults to 1 (i.e. 2 nodes per shard). + NumReplicasPerShard *float64 `json:"numReplicasPerShard,omitempty" tf:"num_replicas_per_shard,omitempty"` + + // The number of shards in the cluster. Defaults to 1. + NumShards *float64 `json:"numShards,omitempty" tf:"num_shards,omitempty"` + + // The name of the parameter group associated with the cluster. + ParameterGroupName *string `json:"parameterGroupName,omitempty" tf:"parameter_group_name,omitempty"` + + // The port number on which each of the nodes accepts connections. Defaults to 6379. + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. + SnapshotArns []*string `json:"snapshotArns,omitempty" tf:"snapshot_arns,omitempty"` + + // The name of a snapshot from which to restore data into the new cluster. + SnapshotName *string `json:"snapshotName,omitempty" tf:"snapshot_name,omitempty"` + + // The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to 0, automatic backups are disabled. Defaults to 0. + SnapshotRetentionLimit *float64 `json:"snapshotRetentionLimit,omitempty" tf:"snapshot_retention_limit,omitempty"` + + // The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: 05:00-09:00. + SnapshotWindow *string `json:"snapshotWindow,omitempty" tf:"snapshot_window,omitempty"` + + // ARN of the SNS topic to which cluster notifications are sent. + SnsTopicArn *string `json:"snsTopicArn,omitempty" tf:"sns_topic_arn,omitempty"` + + // A flag to enable in-transit encryption on the cluster. When set to false, the acl_name must be open-access. Defaults to true. + TLSEnabled *bool `json:"tlsEnabled,omitempty" tf:"tls_enabled,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterObservation struct { // The name of the Access Control List to associate with the cluster. @@ -138,9 +208,18 @@ type ClusterParameters struct { FinalSnapshotName *string `json:"finalSnapshotName,omitempty" tf:"final_snapshot_name,omitempty"` // ARN of the KMS key used to encrypt the cluster at rest. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` + // Reference to a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnRef *v1.Reference `json:"kmsKeyArnRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnSelector *v1.Selector `json:"kmsKeyArnSelector,omitempty" tf:"-"` + // Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: sun:23:00-mon:01:30. // +kubebuilder:validation:Optional MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` @@ -170,7 +249,18 @@ type ClusterParameters struct { // +kubebuilder:validation:Optional Region *string `json:"region,omitempty" tf:"-"` + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // Set of VPC Security Group ID-s to associate with this cluster. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector // +kubebuilder:validation:Optional SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` @@ -195,9 +285,19 @@ type ClusterParameters struct { SnsTopicArn *string `json:"snsTopicArn,omitempty" tf:"sns_topic_arn,omitempty"` // The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/memorydb/v1alpha1.SubnetGroup + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional SubnetGroupName *string `json:"subnetGroupName,omitempty" tf:"subnet_group_name,omitempty"` + // Reference to a SubnetGroup in memorydb to populate subnetGroupName. + // +kubebuilder:validation:Optional + SubnetGroupNameRef *v1.Reference `json:"subnetGroupNameRef,omitempty" tf:"-"` + + // Selector for a SubnetGroup in memorydb to populate subnetGroupName. + // +kubebuilder:validation:Optional + SubnetGroupNameSelector *v1.Selector `json:"subnetGroupNameSelector,omitempty" tf:"-"` + // A flag to enable in-transit encryption on the cluster. When set to false, the acl_name must be open-access. Defaults to true. // +kubebuilder:validation:Optional TLSEnabled *bool `json:"tlsEnabled,omitempty" tf:"tls_enabled,omitempty"` @@ -211,6 +311,9 @@ type ClusterParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type EndpointInitParameters struct { +} + type EndpointObservation struct { // DNS hostname of the cluster configuration endpoint. @@ -223,6 +326,9 @@ type EndpointObservation struct { type EndpointParameters struct { } +type NodesInitParameters struct { +} + type NodesObservation struct { // The Availability Zone in which the node resides. @@ -240,6 +346,9 @@ type NodesObservation struct { type NodesParameters struct { } +type ShardsInitParameters struct { +} + type ShardsObservation struct { // Name of the cluster. Conflicts with name_prefix. @@ -262,6 +371,17 @@ type ShardsParameters struct { type ClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInitParameters `json:"initProvider,omitempty"` } // ClusterStatus defines the observed state of Cluster. @@ -282,9 +402,9 @@ type ClusterStatus struct { type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.aclName)",message="aclName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.nodeType)",message="nodeType is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.aclName) || (has(self.initProvider) && has(self.initProvider.aclName))",message="spec.forProvider.aclName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.nodeType) || (has(self.initProvider) && has(self.initProvider.nodeType))",message="spec.forProvider.nodeType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status,omitempty"` } diff --git a/apis/memorydb/v1alpha1/zz_generated.deepcopy.go b/apis/memorydb/v1alpha1/zz_generated.deepcopy.go index 5a6c1ed..21027b6 100644 --- a/apis/memorydb/v1alpha1/zz_generated.deepcopy.go +++ b/apis/memorydb/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -10,6 +9,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -40,6 +40,64 @@ func (in *ACL) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ACLInitParameters) DeepCopyInto(out *ACLInitParameters) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.UserNames != nil { + in, out := &in.UserNames, &out.UserNames + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACLInitParameters. +func (in *ACLInitParameters) DeepCopy() *ACLInitParameters { + if in == nil { + return nil + } + out := new(ACLInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ACLList) DeepCopyInto(out *ACLList) { *out = *in @@ -98,7 +156,8 @@ func (in *ACLObservation) DeepCopyInto(out *ACLObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -113,7 +172,8 @@ func (in *ACLObservation) DeepCopyInto(out *ACLObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -159,7 +219,8 @@ func (in *ACLParameters) DeepCopyInto(out *ACLParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -174,7 +235,8 @@ func (in *ACLParameters) DeepCopyInto(out *ACLParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -209,6 +271,7 @@ func (in *ACLSpec) DeepCopyInto(out *ACLSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACLSpec. @@ -265,6 +328,21 @@ func (in *Cluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConfigurationInitParameters) DeepCopyInto(out *ClusterConfigurationInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigurationInitParameters. +func (in *ClusterConfigurationInitParameters) DeepCopy() *ClusterConfigurationInitParameters { + if in == nil { + return nil + } + out := new(ClusterConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterConfigurationObservation) DeepCopyInto(out *ClusterConfigurationObservation) { *out = *in @@ -360,6 +438,21 @@ func (in *ClusterConfigurationParameters) DeepCopy() *ClusterConfigurationParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterEndpointInitParameters) DeepCopyInto(out *ClusterEndpointInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterEndpointInitParameters. +func (in *ClusterEndpointInitParameters) DeepCopy() *ClusterEndpointInitParameters { + if in == nil { + return nil + } + out := new(ClusterEndpointInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterEndpointObservation) DeepCopyInto(out *ClusterEndpointObservation) { *out = *in @@ -400,6 +493,149 @@ func (in *ClusterEndpointParameters) DeepCopy() *ClusterEndpointParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitParameters) DeepCopyInto(out *ClusterInitParameters) { + *out = *in + if in.ACLName != nil { + in, out := &in.ACLName, &out.ACLName + *out = new(string) + **out = **in + } + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(bool) + **out = **in + } + if in.DataTiering != nil { + in, out := &in.DataTiering, &out.DataTiering + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.FinalSnapshotName != nil { + in, out := &in.FinalSnapshotName, &out.FinalSnapshotName + *out = new(string) + **out = **in + } + if in.MaintenanceWindow != nil { + in, out := &in.MaintenanceWindow, &out.MaintenanceWindow + *out = new(string) + **out = **in + } + if in.NodeType != nil { + in, out := &in.NodeType, &out.NodeType + *out = new(string) + **out = **in + } + if in.NumReplicasPerShard != nil { + in, out := &in.NumReplicasPerShard, &out.NumReplicasPerShard + *out = new(float64) + **out = **in + } + if in.NumShards != nil { + in, out := &in.NumShards, &out.NumShards + *out = new(float64) + **out = **in + } + if in.ParameterGroupName != nil { + in, out := &in.ParameterGroupName, &out.ParameterGroupName + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.SnapshotArns != nil { + in, out := &in.SnapshotArns, &out.SnapshotArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SnapshotName != nil { + in, out := &in.SnapshotName, &out.SnapshotName + *out = new(string) + **out = **in + } + if in.SnapshotRetentionLimit != nil { + in, out := &in.SnapshotRetentionLimit, &out.SnapshotRetentionLimit + *out = new(float64) + **out = **in + } + if in.SnapshotWindow != nil { + in, out := &in.SnapshotWindow, &out.SnapshotWindow + *out = new(string) + **out = **in + } + if in.SnsTopicArn != nil { + in, out := &in.SnsTopicArn, &out.SnsTopicArn + *out = new(string) + **out = **in + } + if in.TLSEnabled != nil { + in, out := &in.TLSEnabled, &out.TLSEnabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitParameters. +func (in *ClusterInitParameters) DeepCopy() *ClusterInitParameters { + if in == nil { + return nil + } + out := new(ClusterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterList) DeepCopyInto(out *ClusterList) { *out = *in @@ -589,7 +825,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -604,7 +841,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -661,6 +899,16 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.KMSKeyArnRef != nil { + in, out := &in.KMSKeyArnRef, &out.KMSKeyArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyArnSelector != nil { + in, out := &in.KMSKeyArnSelector, &out.KMSKeyArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.MaintenanceWindow != nil { in, out := &in.MaintenanceWindow, &out.MaintenanceWindow *out = new(string) @@ -696,6 +944,18 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecurityGroupIds != nil { in, out := &in.SecurityGroupIds, &out.SecurityGroupIds *out = make([]*string, len(*in)) @@ -743,6 +1003,16 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.SubnetGroupNameRef != nil { + in, out := &in.SubnetGroupNameRef, &out.SubnetGroupNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SubnetGroupNameSelector != nil { + in, out := &in.SubnetGroupNameSelector, &out.SubnetGroupNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.TLSEnabled != nil { in, out := &in.TLSEnabled, &out.TLSEnabled *out = new(bool) @@ -756,7 +1026,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -771,7 +1042,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -795,6 +1067,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -824,6 +1097,21 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointInitParameters) DeepCopyInto(out *EndpointInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointInitParameters. +func (in *EndpointInitParameters) DeepCopy() *EndpointInitParameters { + if in == nil { + return nil + } + out := new(EndpointInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EndpointObservation) DeepCopyInto(out *EndpointObservation) { *out = *in @@ -864,6 +1152,21 @@ func (in *EndpointParameters) DeepCopy() *EndpointParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodesInitParameters) DeepCopyInto(out *NodesInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodesInitParameters. +func (in *NodesInitParameters) DeepCopy() *NodesInitParameters { + if in == nil { + return nil + } + out := new(NodesInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodesObservation) DeepCopyInto(out *NodesObservation) { *out = *in @@ -943,6 +1246,70 @@ func (in *ParameterGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterGroupInitParameters) DeepCopyInto(out *ParameterGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Family != nil { + in, out := &in.Family, &out.Family + *out = new(string) + **out = **in + } + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ParameterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupInitParameters. +func (in *ParameterGroupInitParameters) DeepCopy() *ParameterGroupInitParameters { + if in == nil { + return nil + } + out := new(ParameterGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterGroupList) DeepCopyInto(out *ParameterGroupList) { *out = *in @@ -1013,7 +1380,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1028,7 +1396,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1080,7 +1449,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1095,7 +1465,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1119,6 +1490,7 @@ func (in *ParameterGroupSpec) DeepCopyInto(out *ParameterGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupSpec. @@ -1148,6 +1520,31 @@ func (in *ParameterGroupStatus) DeepCopy() *ParameterGroupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterInitParameters) DeepCopyInto(out *ParameterInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterInitParameters. +func (in *ParameterInitParameters) DeepCopy() *ParameterInitParameters { + if in == nil { + return nil + } + out := new(ParameterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterObservation) DeepCopyInto(out *ParameterObservation) { *out = *in @@ -1198,6 +1595,21 @@ func (in *ParameterParameters) DeepCopy() *ParameterParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShardsInitParameters) DeepCopyInto(out *ShardsInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardsInitParameters. +func (in *ShardsInitParameters) DeepCopy() *ShardsInitParameters { + if in == nil { + return nil + } + out := new(ShardsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ShardsObservation) DeepCopyInto(out *ShardsObservation) { *out = *in @@ -1277,6 +1689,53 @@ func (in *Snapshot) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SnapshotInitParameters) DeepCopyInto(out *SnapshotInitParameters) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotInitParameters. +func (in *SnapshotInitParameters) DeepCopy() *SnapshotInitParameters { + if in == nil { + return nil + } + out := new(SnapshotInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SnapshotList) DeepCopyInto(out *SnapshotList) { *out = *in @@ -1352,7 +1811,8 @@ func (in *SnapshotObservation) DeepCopyInto(out *SnapshotObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1367,7 +1827,8 @@ func (in *SnapshotObservation) DeepCopyInto(out *SnapshotObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1394,11 +1855,31 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { *out = new(string) **out = **in } + if in.ClusterNameRef != nil { + in, out := &in.ClusterNameRef, &out.ClusterNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ClusterNameSelector != nil { + in, out := &in.ClusterNameSelector, &out.ClusterNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.KMSKeyArn != nil { in, out := &in.KMSKeyArn, &out.KMSKeyArn *out = new(string) **out = **in } + if in.KMSKeyArnRef != nil { + in, out := &in.KMSKeyArnRef, &out.KMSKeyArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyArnSelector != nil { + in, out := &in.KMSKeyArnSelector, &out.KMSKeyArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -1412,7 +1893,8 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1427,7 +1909,8 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1451,6 +1934,7 @@ func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec. @@ -1507,6 +1991,58 @@ func (in *SubnetGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetGroupInitParameters) DeepCopyInto(out *SubnetGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupInitParameters. +func (in *SubnetGroupInitParameters) DeepCopy() *SubnetGroupInitParameters { + if in == nil { + return nil + } + out := new(SubnetGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SubnetGroupList) DeepCopyInto(out *SubnetGroupList) { *out = *in @@ -1576,7 +2112,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1591,7 +2128,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1628,6 +2166,18 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { *out = new(string) **out = **in } + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubnetIds != nil { in, out := &in.SubnetIds, &out.SubnetIds *out = make([]*string, len(*in)) @@ -1647,7 +2197,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1662,7 +2213,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1686,6 +2238,7 @@ func (in *SubnetGroupSpec) DeepCopyInto(out *SubnetGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupSpec. diff --git a/apis/memorydb/v1alpha1/zz_generated.managed.go b/apis/memorydb/v1alpha1/zz_generated.managed.go index 71042b1..cfa9d9f 100644 --- a/apis/memorydb/v1alpha1/zz_generated.managed.go +++ b/apis/memorydb/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *ACL) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ACL. -func (mg *ACL) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ACL. +func (mg *ACL) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ACL. @@ -27,14 +27,6 @@ func (mg *ACL) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ACL. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ACL) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ACL. func (mg *ACL) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *ACL) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ACL. -func (mg *ACL) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ACL. +func (mg *ACL) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ACL. @@ -65,14 +57,6 @@ func (mg *ACL) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ACL. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ACL) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ACL. func (mg *ACL) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *Cluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Cluster. -func (mg *Cluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Cluster. +func (mg *Cluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Cluster. @@ -103,14 +87,6 @@ func (mg *Cluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Cluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Cluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *Cluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Cluster. -func (mg *Cluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Cluster. +func (mg *Cluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Cluster. @@ -141,14 +117,6 @@ func (mg *Cluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Cluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Cluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *ParameterGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ParameterGroup. @@ -179,14 +147,6 @@ func (mg *ParameterGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ParameterGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ParameterGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *ParameterGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ParameterGroup. @@ -217,14 +177,6 @@ func (mg *ParameterGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ParameterGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ParameterGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -245,9 +197,9 @@ func (mg *Snapshot) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Snapshot. -func (mg *Snapshot) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Snapshot. +func (mg *Snapshot) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Snapshot. @@ -255,14 +207,6 @@ func (mg *Snapshot) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Snapshot. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Snapshot) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Snapshot. func (mg *Snapshot) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -283,9 +227,9 @@ func (mg *Snapshot) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Snapshot. -func (mg *Snapshot) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Snapshot. +func (mg *Snapshot) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Snapshot. @@ -293,14 +237,6 @@ func (mg *Snapshot) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Snapshot. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Snapshot) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Snapshot. func (mg *Snapshot) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -321,9 +257,9 @@ func (mg *SubnetGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this SubnetGroup. @@ -331,14 +267,6 @@ func (mg *SubnetGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this SubnetGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *SubnetGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -359,9 +287,9 @@ func (mg *SubnetGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this SubnetGroup. @@ -369,14 +297,6 @@ func (mg *SubnetGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this SubnetGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *SubnetGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/memorydb/v1alpha1/zz_generated.resolvers.go b/apis/memorydb/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..0add70c --- /dev/null +++ b/apis/memorydb/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" + errors "github.com/pkg/errors" + v1alpha11 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Cluster. +func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyArnRef, + Selector: mg.Spec.ForProvider.KMSKeyArnSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyArn") + } + mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.SecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SecurityGroupIds") + } + mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetGroupName), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.SubnetGroupNameRef, + Selector: mg.Spec.ForProvider.SubnetGroupNameSelector, + To: reference.To{ + List: &SubnetGroupList{}, + Managed: &SubnetGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetGroupName") + } + mg.Spec.ForProvider.SubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SubnetGroupNameRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this Snapshot. +func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ClusterName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.ClusterNameRef, + Selector: mg.Spec.ForProvider.ClusterNameSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ClusterName") + } + mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyArnRef, + Selector: mg.Spec.ForProvider.KMSKeyArnSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyArn") + } + mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this SubnetGroup. +func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var mrsp reference.MultiResolutionResponse + var err error + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SubnetIDRefs, + Selector: mg.Spec.ForProvider.SubnetIDSelector, + To: reference.To{ + List: &v1alpha11.SubnetList{}, + Managed: &v1alpha11.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetIds") + } + mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences + + return nil +} diff --git a/apis/memorydb/v1alpha1/zz_generated_terraformed.go b/apis/memorydb/v1alpha1/zz_generated_terraformed.go index 5ad6d2a..5b10f1f 100755 --- a/apis/memorydb/v1alpha1/zz_generated_terraformed.go +++ b/apis/memorydb/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this ACL @@ -69,6 +74,46 @@ func (tr *ACL) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ACL +func (tr *ACL) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ACL +func (tr *ACL) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ACL using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ACL) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *Cluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Cluster +func (tr *Cluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Cluster +func (tr *Cluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Cluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Cluster) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *ParameterGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ParameterGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ParameterGroup) LateInitialize(attrs []byte) (bool, error) { @@ -291,6 +416,46 @@ func (tr *Snapshot) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Snapshot +func (tr *Snapshot) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Snapshot +func (tr *Snapshot) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Snapshot using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Snapshot) LateInitialize(attrs []byte) (bool, error) { @@ -365,6 +530,46 @@ func (tr *SubnetGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetGroup) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/memorydb/v1alpha1/zz_groupversion_info.go b/apis/memorydb/v1alpha1/zz_groupversion_info.go index ab7a389..e95843e 100755 --- a/apis/memorydb/v1alpha1/zz_groupversion_info.go +++ b/apis/memorydb/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/memorydb/v1alpha1/zz_parametergroup_types.go b/apis/memorydb/v1alpha1/zz_parametergroup_types.go index 650e977..52c42ab 100755 --- a/apis/memorydb/v1alpha1/zz_parametergroup_types.go +++ b/apis/memorydb/v1alpha1/zz_parametergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ParameterGroupInitParameters struct { + + // Description for the parameter group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The engine version that the parameter group can be used with. + Family *string `json:"family,omitempty" tf:"family,omitempty"` + + // Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below. + Parameter []ParameterInitParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ParameterGroupObservation struct { // The ARN of the parameter group. @@ -65,6 +87,15 @@ type ParameterGroupParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ParameterInitParameters struct { + + // The name of the parameter. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The value of the parameter. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type ParameterObservation struct { // The name of the parameter. @@ -77,11 +108,11 @@ type ParameterObservation struct { type ParameterParameters struct { // The name of the parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The value of the parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -89,6 +120,17 @@ type ParameterParameters struct { type ParameterGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ParameterGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ParameterGroupInitParameters `json:"initProvider,omitempty"` } // ParameterGroupStatus defines the observed state of ParameterGroup. @@ -109,8 +151,8 @@ type ParameterGroupStatus struct { type ParameterGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family)",message="family is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ParameterGroupSpec `json:"spec"` Status ParameterGroupStatus `json:"status,omitempty"` } diff --git a/apis/memorydb/v1alpha1/zz_snapshot_types.go b/apis/memorydb/v1alpha1/zz_snapshot_types.go index 72bb0d0..ae09211 100755 --- a/apis/memorydb/v1alpha1/zz_snapshot_types.go +++ b/apis/memorydb/v1alpha1/zz_snapshot_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,9 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterConfigurationInitParameters struct { +} + type ClusterConfigurationObservation struct { // Description for the cluster. @@ -58,6 +65,15 @@ type ClusterConfigurationObservation struct { type ClusterConfigurationParameters struct { } +type SnapshotInitParameters struct { + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SnapshotObservation struct { // The ARN of the snapshot. @@ -88,13 +104,31 @@ type SnapshotObservation struct { type SnapshotParameters struct { // Name of the MemoryDB cluster to take a snapshot of. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/memorydb/v1alpha1.Cluster // +kubebuilder:validation:Optional ClusterName *string `json:"clusterName,omitempty" tf:"cluster_name,omitempty"` + // Reference to a Cluster in memorydb to populate clusterName. + // +kubebuilder:validation:Optional + ClusterNameRef *v1.Reference `json:"clusterNameRef,omitempty" tf:"-"` + + // Selector for a Cluster in memorydb to populate clusterName. + // +kubebuilder:validation:Optional + ClusterNameSelector *v1.Selector `json:"clusterNameSelector,omitempty" tf:"-"` + // ARN of the KMS key used to encrypt the snapshot at rest. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"` + // Reference to a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnRef *v1.Reference `json:"kmsKeyArnRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyArn. + // +kubebuilder:validation:Optional + KMSKeyArnSelector *v1.Selector `json:"kmsKeyArnSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -113,6 +147,17 @@ type SnapshotParameters struct { type SnapshotSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SnapshotParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SnapshotInitParameters `json:"initProvider,omitempty"` } // SnapshotStatus defines the observed state of Snapshot. @@ -133,8 +178,7 @@ type SnapshotStatus struct { type Snapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterName)",message="clusterName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SnapshotSpec `json:"spec"` Status SnapshotStatus `json:"status,omitempty"` } diff --git a/apis/memorydb/v1alpha1/zz_subnetgroup_types.go b/apis/memorydb/v1alpha1/zz_subnetgroup_types.go index 4c75e4d..842f597 100755 --- a/apis/memorydb/v1alpha1/zz_subnetgroup_types.go +++ b/apis/memorydb/v1alpha1/zz_subnetgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SubnetGroupInitParameters struct { + + // Description for the subnet group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SubnetGroupObservation struct { // The ARN of the subnet group. @@ -48,7 +64,18 @@ type SubnetGroupParameters struct { // +kubebuilder:validation:Optional Region *string `json:"region,omitempty" tf:"-"` + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + // Set of VPC Subnet ID-s for the subnet group. At least one subnet must be provided. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector // +kubebuilder:validation:Optional SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` @@ -65,6 +92,17 @@ type SubnetGroupParameters struct { type SubnetGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SubnetGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SubnetGroupInitParameters `json:"initProvider,omitempty"` } // SubnetGroupStatus defines the observed state of SubnetGroup. @@ -85,8 +123,7 @@ type SubnetGroupStatus struct { type SubnetGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds)",message="subnetIds is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SubnetGroupSpec `json:"spec"` Status SubnetGroupStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_cluster_types.go b/apis/rds/v1alpha1/zz_cluster_types.go index 71cfa6e..b965d45 100755 --- a/apis/rds/v1alpha1/zz_cluster_types.go +++ b/apis/rds/v1alpha1/zz_cluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,134 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterInitParameters struct { + + // The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. + AllocatedStorage *float64 `json:"allocatedStorage,omitempty" tf:"allocated_storage,omitempty"` + + // Enable to allow major engine version upgrades when changing engine versions. Defaults to false. + AllowMajorVersionUpgrade *bool `json:"allowMajorVersionUpgrade,omitempty" tf:"allow_major_version_upgrade,omitempty"` + + // Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is false. See Amazon RDS Documentation for more information. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // List of EC2 Availability Zones for the DB cluster storage where DB cluster instances can be created. We recommend specifying 3 AZs or using the if necessary. A maximum of 3 AZs can be configured. + AvailabilityZones []*string `json:"availabilityZones,omitempty" tf:"availability_zones,omitempty"` + + // Target backtrack window, in seconds. Only available for aurora and aurora-mysql engines currently. To disable backtracking, set this value to 0. Defaults to 0. Must be between 0 and 259200 (72 hours) + BacktrackWindow *float64 `json:"backtrackWindow,omitempty" tf:"backtrack_window,omitempty"` + + // Days to retain backups for. Default 1 + BackupRetentionPeriod *float64 `json:"backupRetentionPeriod,omitempty" tf:"backup_retention_period,omitempty"` + + // – List of RDS Instances that are a part of this cluster + ClusterMembers []*string `json:"clusterMembers,omitempty" tf:"cluster_members,omitempty"` + + // – Copy all Cluster tags to snapshots. Default is false. + CopyTagsToSnapshot *bool `json:"copyTagsToSnapshot,omitempty" tf:"copy_tags_to_snapshot,omitempty"` + + // Compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes and availability for your engine, see DB instance class in the Amazon RDS User Guide. (This setting is required to create a Multi-AZ DB cluster). + DBClusterInstanceClass *string `json:"dbClusterInstanceClass,omitempty" tf:"db_cluster_instance_class,omitempty"` + + DBClusterParameterGroupName *string `json:"dbClusterParameterGroupName,omitempty" tf:"db_cluster_parameter_group_name,omitempty"` + + // Instance parameter group to associate with all instances of the DB cluster. The db_instance_parameter_group_name parameter is only valid in combination with the allow_major_version_upgrade parameter. + DBInstanceParameterGroupName *string `json:"dbInstanceParameterGroupName,omitempty" tf:"db_instance_parameter_group_name,omitempty"` + + // Name for an automatically created database on cluster creation. There are different naming restrictions per database engine: RDS Naming Constraints + DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` + + // If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. + DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + + // Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an aws_rds_global_cluster's primary cluster. See the Aurora Userguide documentation for more information. + EnableGlobalWriteForwarding *bool `json:"enableGlobalWriteForwarding,omitempty" tf:"enable_global_write_forwarding,omitempty"` + + // Enable HTTP endpoint (data API). Only valid when engine_mode is set to serverless. + EnableHTTPEndpoint *bool `json:"enableHttpEndpoint,omitempty" tf:"enable_http_endpoint,omitempty"` + + // Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: audit, error, general, slowquery, postgresql (PostgreSQL). + EnabledCloudwatchLogsExports []*string `json:"enabledCloudwatchLogsExports,omitempty" tf:"enabled_cloudwatch_logs_exports,omitempty"` + + // Name of the database engine to be used for this DB cluster. Valid Values: aurora-mysql, aurora-postgresql, mysql, postgres. (Note that mysql and postgres are Multi-AZ RDS clusters). + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Database engine mode. Valid values: global (only valid for Aurora MySQL 1.21 and earlier), multimaster, parallelquery, provisioned, serverless. Defaults to: provisioned. See the RDS User Guide for limitations when using serverless. + EngineMode *string `json:"engineMode,omitempty" tf:"engine_mode,omitempty"` + + // Database engine version. Updating this argument results in an outage. See the Aurora MySQL and Aurora Postgres documentation for your configured engine to determine this value, or by running aws rds describe-db-engine-versions. For example with Aurora MySQL 2, a potential value for this argument is 5.7.mysql_aurora.2.03.2. The value can contain a partial version where supported by the API. The actual engine version used is returned in the attribute engine_version_actual, , see Attributes Reference below. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // Name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. + FinalSnapshotIdentifier *string `json:"finalSnapshotIdentifier,omitempty" tf:"final_snapshot_identifier,omitempty"` + + // Global cluster identifier specified on aws_rds_global_cluster. + GlobalClusterIdentifier *string `json:"globalClusterIdentifier,omitempty" tf:"global_cluster_identifier,omitempty"` + + // Specifies whether or not mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. Please see AWS Documentation for availability and limitations. + IAMDatabaseAuthenticationEnabled *bool `json:"iamDatabaseAuthenticationEnabled,omitempty" tf:"iam_database_authentication_enabled,omitempty"` + + // Amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster. For information about valid Iops values, see Amazon RDS Provisioned IOPS storage to improve performance in the Amazon RDS User Guide. (This setting is required to create a Multi-AZ DB cluster). Must be a multiple between .5 and 50 of the storage amount for the DB cluster. + Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` + + // Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if master_password is provided. + ManageMasterUserPassword *bool `json:"manageMasterUserPassword,omitempty" tf:"manage_master_user_password,omitempty"` + + // Username for the master DB user. Please refer to the RDS Naming Constraints. This argument does not support in-place updates and cannot be changed during a restore from snapshot. + MasterUsername *string `json:"masterUsername,omitempty" tf:"master_username,omitempty"` + + // Network type of the cluster. Valid values: IPV4, DUAL. + NetworkType *string `json:"networkType,omitempty" tf:"network_type,omitempty"` + + // Port on which the DB accepts connections + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // Daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC. Default: A 30-minute window selected at random from an 8-hour block of time per regionE.g., 04:00-09:00 + PreferredBackupWindow *string `json:"preferredBackupWindow,omitempty" tf:"preferred_backup_window,omitempty"` + + // Weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30 + PreferredMaintenanceWindow *string `json:"preferredMaintenanceWindow,omitempty" tf:"preferred_maintenance_window,omitempty"` + + // ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica. + ReplicationSourceIdentifier *string `json:"replicationSourceIdentifier,omitempty" tf:"replication_source_identifier,omitempty"` + + // Nested attribute for point in time restore. More details below. + RestoreToPointInTime []ClusterRestoreToPointInTimeInitParameters `json:"restoreToPointInTime,omitempty" tf:"restore_to_point_in_time,omitempty"` + + // Port on which the DB accepts connections + S3Import []ClusterS3ImportInitParameters `json:"s3Import,omitempty" tf:"s3_import,omitempty"` + + // Nested attribute with scaling properties. Only valid when engine_mode is set to serverless. More details below. + ScalingConfiguration []ScalingConfigurationInitParameters `json:"scalingConfiguration,omitempty" tf:"scaling_configuration,omitempty"` + + // Nested attribute with scaling properties for ServerlessV2. Only valid when engine_mode is set to provisioned. More details below. + Serverlessv2ScalingConfiguration []Serverlessv2ScalingConfigurationInitParameters `json:"serverlessv2ScalingConfiguration,omitempty" tf:"serverlessv2_scaling_configuration,omitempty"` + + // Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from final_snapshot_identifier. Default is false. + SkipFinalSnapshot *bool `json:"skipFinalSnapshot,omitempty" tf:"skip_final_snapshot,omitempty"` + + // Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Conflicts with global_cluster_identifier. Clusters cannot be restored from snapshot and joined to an existing global cluster in a single operation. See the AWS documentation or the Global Cluster Restored From Snapshot example for instructions on building a global cluster starting with a snapshot. + SnapshotIdentifier *string `json:"snapshotIdentifier,omitempty" tf:"snapshot_identifier,omitempty"` + + // The source region for an encrypted replica DB cluster. + SourceRegion *string `json:"sourceRegion,omitempty" tf:"source_region,omitempty"` + + // Specifies whether the DB cluster is encrypted. The default is false for provisioned engine_mode and true for serverless engine_mode. When restoring an unencrypted snapshot_identifier, the kms_key_id argument must be provided to encrypt the restored cluster. + StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` + + // (Forces new for Multi-AZ DB clusters) Specifies the storage type to be associated with the DB cluster. For Aurora DB clusters, storage_type modifications can be done in-place. For Multi-AZ DB Clusters, the iops argument must also be set. Valid values are: "", aurora-iopt1 (Aurora DB Clusters); io1 (Multi-AZ DB Clusters). Default: "" (Aurora DB Clusters); io1 (Multi-AZ DB Clusters). + StorageType *string `json:"storageType,omitempty" tf:"storage_type,omitempty"` + + // A map of tags to assign to the DB cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type ClusterMasterUserSecretInitParameters struct { +} + type ClusterMasterUserSecretObservation struct { // Amazon Web Services KMS key identifier that is used to encrypt the secret. @@ -300,9 +432,18 @@ type ClusterParameters struct { Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` // ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if master_password is provided. // +kubebuilder:validation:Optional ManageMasterUserPassword *bool `json:"manageMasterUserPassword,omitempty" tf:"manage_master_user_password,omitempty"` @@ -312,9 +453,19 @@ type ClusterParameters struct { MasterPasswordSecretRef *v1.SecretKeySelector `json:"masterPasswordSecretRef,omitempty" tf:"-"` // Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("key_id",true) // +kubebuilder:validation:Optional MasterUserSecretKMSKeyID *string `json:"masterUserSecretKmsKeyId,omitempty" tf:"master_user_secret_kms_key_id,omitempty"` + // Reference to a Key in kms to populate masterUserSecretKmsKeyId. + // +kubebuilder:validation:Optional + MasterUserSecretKMSKeyIDRef *v1.Reference `json:"masterUserSecretKmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate masterUserSecretKmsKeyId. + // +kubebuilder:validation:Optional + MasterUserSecretKMSKeyIDSelector *v1.Selector `json:"masterUserSecretKmsKeyIdSelector,omitempty" tf:"-"` + // Username for the master DB user. Please refer to the RDS Naming Constraints. This argument does not support in-place updates and cannot be changed during a restore from snapshot. // +kubebuilder:validation:Optional MasterUsername *string `json:"masterUsername,omitempty" tf:"master_username,omitempty"` @@ -388,11 +539,35 @@ type ClusterParameters struct { // +kubebuilder:validation:Optional TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + // References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"` + // List of VPC security groups to associate with the Cluster + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector // +kubebuilder:validation:Optional VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"` } +type ClusterRestoreToPointInTimeInitParameters struct { + + // Date and time in UTC format to restore the database cluster to. Conflicts with use_latest_restorable_time. + RestoreToTime *string `json:"restoreToTime,omitempty" tf:"restore_to_time,omitempty"` + + // Type of restore to be performed. + // Valid options are full-copy (default) and copy-on-write. + RestoreType *string `json:"restoreType,omitempty" tf:"restore_type,omitempty"` + + // Set to true to restore the database cluster to the latest restorable backup time. Defaults to false. Conflicts with restore_to_time. + UseLatestRestorableTime *bool `json:"useLatestRestorableTime,omitempty" tf:"use_latest_restorable_time,omitempty"` +} + type ClusterRestoreToPointInTimeObservation struct { // Date and time in UTC format to restore the database cluster to. Conflicts with use_latest_restorable_time. @@ -438,7 +613,7 @@ type ClusterRestoreToPointInTimeParameters struct { UseLatestRestorableTime *bool `json:"useLatestRestorableTime,omitempty" tf:"use_latest_restorable_time,omitempty"` } -type ClusterS3ImportObservation struct { +type ClusterS3ImportInitParameters struct { // Bucket name where your backup is stored BucketName *string `json:"bucketName,omitempty" tf:"bucket_name,omitempty"` @@ -456,38 +631,65 @@ type ClusterS3ImportObservation struct { SourceEngineVersion *string `json:"sourceEngineVersion,omitempty" tf:"source_engine_version,omitempty"` } -type ClusterS3ImportParameters struct { +type ClusterS3ImportObservation struct { // Bucket name where your backup is stored - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket - // +kubebuilder:validation:Optional BucketName *string `json:"bucketName,omitempty" tf:"bucket_name,omitempty"` - // Reference to a Bucket in s3 to populate bucketName. - // +kubebuilder:validation:Optional - BucketNameRef *v1.Reference `json:"bucketNameRef,omitempty" tf:"-"` + // Can be blank, but is the path to your backup + BucketPrefix *string `json:"bucketPrefix,omitempty" tf:"bucket_prefix,omitempty"` - // Selector for a Bucket in s3 to populate bucketName. + // Role applied to load the data. + IngestionRole *string `json:"ingestionRole,omitempty" tf:"ingestion_role,omitempty"` + + // Source engine for the backup + SourceEngine *string `json:"sourceEngine,omitempty" tf:"source_engine,omitempty"` + + // Version of the source engine used to make the backup + SourceEngineVersion *string `json:"sourceEngineVersion,omitempty" tf:"source_engine_version,omitempty"` +} + +type ClusterS3ImportParameters struct { + + // Bucket name where your backup is stored // +kubebuilder:validation:Optional - BucketNameSelector *v1.Selector `json:"bucketNameSelector,omitempty" tf:"-"` + BucketName *string `json:"bucketName" tf:"bucket_name,omitempty"` // Can be blank, but is the path to your backup // +kubebuilder:validation:Optional BucketPrefix *string `json:"bucketPrefix,omitempty" tf:"bucket_prefix,omitempty"` // Role applied to load the data. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional IngestionRole *string `json:"ingestionRole" tf:"ingestion_role,omitempty"` // Source engine for the backup - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional SourceEngine *string `json:"sourceEngine" tf:"source_engine,omitempty"` // Version of the source engine used to make the backup - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional SourceEngineVersion *string `json:"sourceEngineVersion" tf:"source_engine_version,omitempty"` } +type ScalingConfigurationInitParameters struct { + + // Whether to enable automatic pause. A DB cluster can be paused only when it's idle (it has no connections). If a DB cluster is paused for more than seven days, the DB cluster might be backed up with a snapshot. In this case, the DB cluster is restored when there is a request to connect to it. Defaults to true. + AutoPause *bool `json:"autoPause,omitempty" tf:"auto_pause,omitempty"` + + // Maximum capacity for an Aurora DB cluster in serverless DB engine mode. The maximum capacity must be greater than or equal to the minimum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 16. + MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` + + // Minimum capacity for an Aurora DB cluster in serverless DB engine mode. The minimum capacity must be lesser than or equal to the maximum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 1. + MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` + + // Time, in seconds, before an Aurora DB cluster in serverless mode is paused. Valid values are 300 through 86400. Defaults to 300. + SecondsUntilAutoPause *float64 `json:"secondsUntilAutoPause,omitempty" tf:"seconds_until_auto_pause,omitempty"` + + // Action to take when the timeout is reached. Valid values: ForceApplyCapacityChange, RollbackCapacityChange. Defaults to RollbackCapacityChange. See documentation. + TimeoutAction *string `json:"timeoutAction,omitempty" tf:"timeout_action,omitempty"` +} + type ScalingConfigurationObservation struct { // Whether to enable automatic pause. A DB cluster can be paused only when it's idle (it has no connections). If a DB cluster is paused for more than seven days, the DB cluster might be backed up with a snapshot. In this case, the DB cluster is restored when there is a request to connect to it. Defaults to true. @@ -529,6 +731,15 @@ type ScalingConfigurationParameters struct { TimeoutAction *string `json:"timeoutAction,omitempty" tf:"timeout_action,omitempty"` } +type Serverlessv2ScalingConfigurationInitParameters struct { + + // Maximum capacity for an Aurora DB cluster in serverless DB engine mode. The maximum capacity must be greater than or equal to the minimum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 16. + MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` + + // Minimum capacity for an Aurora DB cluster in serverless DB engine mode. The minimum capacity must be lesser than or equal to the maximum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 1. + MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +} + type Serverlessv2ScalingConfigurationObservation struct { // Maximum capacity for an Aurora DB cluster in serverless DB engine mode. The maximum capacity must be greater than or equal to the minimum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 16. @@ -541,11 +752,11 @@ type Serverlessv2ScalingConfigurationObservation struct { type Serverlessv2ScalingConfigurationParameters struct { // Maximum capacity for an Aurora DB cluster in serverless DB engine mode. The maximum capacity must be greater than or equal to the minimum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 16. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional MaxCapacity *float64 `json:"maxCapacity" tf:"max_capacity,omitempty"` // Minimum capacity for an Aurora DB cluster in serverless DB engine mode. The minimum capacity must be lesser than or equal to the maximum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 1. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional MinCapacity *float64 `json:"minCapacity" tf:"min_capacity,omitempty"` } @@ -553,6 +764,17 @@ type Serverlessv2ScalingConfigurationParameters struct { type ClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInitParameters `json:"initProvider,omitempty"` } // ClusterStatus defines the observed state of Cluster. @@ -573,8 +795,8 @@ type ClusterStatus struct { type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine)",message="engine is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engine) || (has(self.initProvider) && has(self.initProvider.engine))",message="spec.forProvider.engine is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clusteractivitystream_types.go b/apis/rds/v1alpha1/zz_clusteractivitystream_types.go index c6d5e39..289ce4e 100755 --- a/apis/rds/v1alpha1/zz_clusteractivitystream_types.go +++ b/apis/rds/v1alpha1/zz_clusteractivitystream_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,15 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterActivityStreamInitParameters struct { + + // Specifies whether the database activity stream includes engine-native audit fields. This option only applies to an Oracle DB instance. By default, no engine-native audit fields are included. Defaults false. + EngineNativeAuditFieldsIncluded *bool `json:"engineNativeAuditFieldsIncluded,omitempty" tf:"engine_native_audit_fields_included,omitempty"` + + // Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously. One of: sync, async. + Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +} + type ClusterActivityStreamObservation struct { // Specifies whether the database activity stream includes engine-native audit fields. This option only applies to an Oracle DB instance. By default, no engine-native audit fields are included. Defaults false. @@ -41,9 +54,18 @@ type ClusterActivityStreamParameters struct { EngineNativeAuditFieldsIncluded *bool `json:"engineNativeAuditFieldsIncluded,omitempty" tf:"engine_native_audit_fields_included,omitempty"` // The AWS KMS key identifier for encrypting messages in the database activity stream. The AWS KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // Specifies the mode of the database activity stream. Database events such as a change or access generate an activity stream event. The database session can handle these events either synchronously or asynchronously. One of: sync, async. // +kubebuilder:validation:Optional Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` @@ -54,14 +76,35 @@ type ClusterActivityStreamParameters struct { Region *string `json:"region,omitempty" tf:"-"` // The Amazon Resource Name (ARN) of the DB cluster. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional ResourceArn *string `json:"resourceArn,omitempty" tf:"resource_arn,omitempty"` + + // Reference to a Cluster in rds to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnRef *v1.Reference `json:"resourceArnRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnSelector *v1.Selector `json:"resourceArnSelector,omitempty" tf:"-"` } // ClusterActivityStreamSpec defines the desired state of ClusterActivityStream type ClusterActivityStreamSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterActivityStreamParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterActivityStreamInitParameters `json:"initProvider,omitempty"` } // ClusterActivityStreamStatus defines the observed state of ClusterActivityStream. @@ -82,10 +125,8 @@ type ClusterActivityStreamStatus struct { type ClusterActivityStream struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.kmsKeyId)",message="kmsKeyId is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.mode)",message="mode is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.resourceArn)",message="resourceArn is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.mode) || (has(self.initProvider) && has(self.initProvider.mode))",message="spec.forProvider.mode is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterActivityStreamSpec `json:"spec"` Status ClusterActivityStreamStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clusterendpoint_types.go b/apis/rds/v1alpha1/zz_clusterendpoint_types.go index 628c78e..eaf87ed 100755 --- a/apis/rds/v1alpha1/zz_clusterendpoint_types.go +++ b/apis/rds/v1alpha1/zz_clusterendpoint_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterEndpointInitParameters struct { + + // The type of the endpoint. One of: READER , ANY . + CustomEndpointType *string `json:"customEndpointType,omitempty" tf:"custom_endpoint_type,omitempty"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty. Conflicts with static_members. + ExcludedMembers []*string `json:"excludedMembers,omitempty" tf:"excluded_members,omitempty"` + + // List of DB instance identifiers that are part of the custom endpoint group. Conflicts with excluded_members. + StaticMembers []*string `json:"staticMembers,omitempty" tf:"static_members,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterEndpointObservation struct { // Amazon Resource Name (ARN) of cluster @@ -46,9 +68,19 @@ type ClusterEndpointObservation struct { type ClusterEndpointParameters struct { // The cluster identifier. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional ClusterIdentifier *string `json:"clusterIdentifier,omitempty" tf:"cluster_identifier,omitempty"` + // Reference to a Cluster in rds to populate clusterIdentifier. + // +kubebuilder:validation:Optional + ClusterIdentifierRef *v1.Reference `json:"clusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate clusterIdentifier. + // +kubebuilder:validation:Optional + ClusterIdentifierSelector *v1.Selector `json:"clusterIdentifierSelector,omitempty" tf:"-"` + // The type of the endpoint. One of: READER , ANY . // +kubebuilder:validation:Optional CustomEndpointType *string `json:"customEndpointType,omitempty" tf:"custom_endpoint_type,omitempty"` @@ -79,6 +111,17 @@ type ClusterEndpointParameters struct { type ClusterEndpointSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterEndpointParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterEndpointInitParameters `json:"initProvider,omitempty"` } // ClusterEndpointStatus defines the observed state of ClusterEndpoint. @@ -99,9 +142,8 @@ type ClusterEndpointStatus struct { type ClusterEndpoint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterIdentifier)",message="clusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.customEndpointType)",message="customEndpointType is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.customEndpointType) || (has(self.initProvider) && has(self.initProvider.customEndpointType))",message="spec.forProvider.customEndpointType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterEndpointSpec `json:"spec"` Status ClusterEndpointStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clusterinstance_types.go b/apis/rds/v1alpha1/zz_clusterinstance_types.go index 883c543..c97f5f3 100755 --- a/apis/rds/v1alpha1/zz_clusterinstance_types.go +++ b/apis/rds/v1alpha1/zz_clusterinstance_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,63 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterInstanceInitParameters struct { + + // Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default isfalse. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Default true. + AutoMinorVersionUpgrade *bool `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // EC2 Availability Zone that the DB instance is created in. See docs about the details. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // Identifier of the CA certificate for the DB instance. + CACertIdentifier *string `json:"caCertIdentifier,omitempty" tf:"ca_cert_identifier,omitempty"` + + // defined tags from the DB instance to snapshots of the DB instance. Default false. + CopyTagsToSnapshot *bool `json:"copyTagsToSnapshot,omitempty" tf:"copy_tags_to_snapshot,omitempty"` + + // Name of the DB parameter group to associate with this instance. + DBParameterGroupName *string `json:"dbParameterGroupName,omitempty" tf:"db_parameter_group_name,omitempty"` + + // Name of the database engine to be used for the RDS instance. Valid Values: aurora-mysql, aurora-postgresql, mysql, postgres. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Database engine version. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // Instance class to use. For details on CPU and memory, see Scaling Aurora DB Instances. Aurora uses db.* instance classes/types. Please see AWS Documentation for currently available instance classes and complete details. + InstanceClass *string `json:"instanceClass,omitempty" tf:"instance_class,omitempty"` + + // Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. + MonitoringInterval *float64 `json:"monitoringInterval,omitempty" tf:"monitoring_interval,omitempty"` + + // Specifies whether Performance Insights is enabled or not. + PerformanceInsightsEnabled *bool `json:"performanceInsightsEnabled,omitempty" tf:"performance_insights_enabled,omitempty"` + + // Amount of time in days to retain Performance Insights data. Valid values are 7, 731 (2 years) or a multiple of 31. When specifying performance_insights_retention_period, performance_insights_enabled needs to be set to true. Defaults to '7'. + PerformanceInsightsRetentionPeriod *float64 `json:"performanceInsightsRetentionPeriod,omitempty" tf:"performance_insights_retention_period,omitempty"` + + // Daily time range during which automated backups are created if automated backups are enabled. Eg: "04:00-09:00". NOTE: If preferred_backup_window is set at the cluster level, this argument must be omitted. + PreferredBackupWindow *string `json:"preferredBackupWindow,omitempty" tf:"preferred_backup_window,omitempty"` + + // Window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". + PreferredMaintenanceWindow *string `json:"preferredMaintenanceWindow,omitempty" tf:"preferred_maintenance_window,omitempty"` + + // Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer. + PromotionTier *float64 `json:"promotionTier,omitempty" tf:"promotion_tier,omitempty"` + + // Bool to control if instance is publicly accessible. Default false. See the documentation on Creating DB Instances for more details on controlling this property. + PubliclyAccessible *bool `json:"publiclyAccessible,omitempty" tf:"publicly_accessible,omitempty"` + + // Map of tags to assign to the instance. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterInstanceObservation struct { // Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default isfalse. @@ -131,9 +192,19 @@ type ClusterInstanceParameters struct { CACertIdentifier *string `json:"caCertIdentifier,omitempty" tf:"ca_cert_identifier,omitempty"` // Identifier of the aws_rds_cluster in which to launch this instance. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional ClusterIdentifier *string `json:"clusterIdentifier,omitempty" tf:"cluster_identifier,omitempty"` + // Reference to a Cluster in rds to populate clusterIdentifier. + // +kubebuilder:validation:Optional + ClusterIdentifierRef *v1.Reference `json:"clusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate clusterIdentifier. + // +kubebuilder:validation:Optional + ClusterIdentifierSelector *v1.Selector `json:"clusterIdentifierSelector,omitempty" tf:"-"` + // defined tags from the DB instance to snapshots of the DB instance. Default false. // +kubebuilder:validation:Optional CopyTagsToSnapshot *bool `json:"copyTagsToSnapshot,omitempty" tf:"copy_tags_to_snapshot,omitempty"` @@ -172,15 +243,25 @@ type ClusterInstanceParameters struct { MonitoringInterval *float64 `json:"monitoringInterval,omitempty" tf:"monitoring_interval,omitempty"` // ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the AWS Documentation what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional MonitoringRoleArn *string `json:"monitoringRoleArn,omitempty" tf:"monitoring_role_arn,omitempty"` + // Reference to a Role in iam to populate monitoringRoleArn. + // +kubebuilder:validation:Optional + MonitoringRoleArnRef *v1.Reference `json:"monitoringRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate monitoringRoleArn. + // +kubebuilder:validation:Optional + MonitoringRoleArnSelector *v1.Selector `json:"monitoringRoleArnSelector,omitempty" tf:"-"` + // Specifies whether Performance Insights is enabled or not. // +kubebuilder:validation:Optional PerformanceInsightsEnabled *bool `json:"performanceInsightsEnabled,omitempty" tf:"performance_insights_enabled,omitempty"` // ARN for the KMS key to encrypt Performance Insights data. When specifying performance_insights_kms_key_id, performance_insights_enabled needs to be set to true. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional PerformanceInsightsKMSKeyID *string `json:"performanceInsightsKmsKeyId,omitempty" tf:"performance_insights_kms_key_id,omitempty"` @@ -230,6 +311,17 @@ type ClusterInstanceParameters struct { type ClusterInstanceSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterInstanceParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterInstanceInitParameters `json:"initProvider,omitempty"` } // ClusterInstanceStatus defines the observed state of ClusterInstance. @@ -250,10 +342,9 @@ type ClusterInstanceStatus struct { type ClusterInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterIdentifier)",message="clusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine)",message="engine is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass)",message="instanceClass is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engine) || (has(self.initProvider) && has(self.initProvider.engine))",message="spec.forProvider.engine is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceClass) || (has(self.initProvider) && has(self.initProvider.instanceClass))",message="spec.forProvider.instanceClass is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterInstanceSpec `json:"spec"` Status ClusterInstanceStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clusterparametergroup_types.go b/apis/rds/v1alpha1/zz_clusterparametergroup_types.go index 231cb7e..aa6becf 100755 --- a/apis/rds/v1alpha1/zz_clusterparametergroup_types.go +++ b/apis/rds/v1alpha1/zz_clusterparametergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterParameterGroupInitParameters struct { + + // The description of the DB cluster parameter group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The family of the DB cluster parameter group. + Family *string `json:"family,omitempty" tf:"family,omitempty"` + + // A list of DB parameters to apply. Note that parameters may differ from a family to an other. Full list of all parameters can be discovered via aws rds describe-db-cluster-parameters after initial creation of the group. + Parameter []ClusterParameterGroupParameterInitParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterParameterGroupObservation struct { // The ARN of the db cluster parameter group. @@ -37,6 +59,20 @@ type ClusterParameterGroupObservation struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ClusterParameterGroupParameterInitParameters struct { + + // "immediate" (default), or "pending-reboot". Some + // engines can't apply some parameters without a reboot, and you will need to + // specify "pending-reboot" here. + ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` + + // The name of the DB cluster parameter group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The value of the DB parameter. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type ClusterParameterGroupParameterObservation struct { // "immediate" (default), or "pending-reboot". Some @@ -60,11 +96,11 @@ type ClusterParameterGroupParameterParameters struct { ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` // The name of the DB cluster parameter group. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The value of the DB parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -100,6 +136,17 @@ type ClusterParameterGroupParameters struct { type ClusterParameterGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterParameterGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterParameterGroupInitParameters `json:"initProvider,omitempty"` } // ClusterParameterGroupStatus defines the observed state of ClusterParameterGroup. @@ -120,8 +167,8 @@ type ClusterParameterGroupStatus struct { type ClusterParameterGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family)",message="family is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterParameterGroupSpec `json:"spec"` Status ClusterParameterGroupStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clusterroleassociation_types.go b/apis/rds/v1alpha1/zz_clusterroleassociation_types.go index 9718012..7c19e07 100755 --- a/apis/rds/v1alpha1/zz_clusterroleassociation_types.go +++ b/apis/rds/v1alpha1/zz_clusterroleassociation_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterRoleAssociationInitParameters struct { + + // Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions. + FeatureName *string `json:"featureName,omitempty" tf:"feature_name,omitempty"` +} + type ClusterRoleAssociationObservation struct { // DB Cluster Identifier to associate with the IAM Role. @@ -31,9 +41,19 @@ type ClusterRoleAssociationObservation struct { type ClusterRoleAssociationParameters struct { // DB Cluster Identifier to associate with the IAM Role. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional DBClusterIdentifier *string `json:"dbClusterIdentifier,omitempty" tf:"db_cluster_identifier,omitempty"` + // Reference to a Cluster in rds to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierRef *v1.Reference `json:"dbClusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierSelector *v1.Selector `json:"dbClusterIdentifierSelector,omitempty" tf:"-"` + // Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions. // +kubebuilder:validation:Optional FeatureName *string `json:"featureName,omitempty" tf:"feature_name,omitempty"` @@ -44,14 +64,35 @@ type ClusterRoleAssociationParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional RoleArn *string `json:"roleArn,omitempty" tf:"role_arn,omitempty"` + + // Reference to a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnRef *v1.Reference `json:"roleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnSelector *v1.Selector `json:"roleArnSelector,omitempty" tf:"-"` } // ClusterRoleAssociationSpec defines the desired state of ClusterRoleAssociation type ClusterRoleAssociationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterRoleAssociationParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterRoleAssociationInitParameters `json:"initProvider,omitempty"` } // ClusterRoleAssociationStatus defines the observed state of ClusterRoleAssociation. @@ -72,10 +113,8 @@ type ClusterRoleAssociationStatus struct { type ClusterRoleAssociation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier)",message="dbClusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.featureName)",message="featureName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn)",message="roleArn is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.featureName) || (has(self.initProvider) && has(self.initProvider.featureName))",message="spec.forProvider.featureName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterRoleAssociationSpec `json:"spec"` Status ClusterRoleAssociationStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_clustersnapshot_types.go b/apis/rds/v1alpha1/zz_clustersnapshot_types.go index e2f4303..f1640c1 100755 --- a/apis/rds/v1alpha1/zz_clustersnapshot_types.go +++ b/apis/rds/v1alpha1/zz_clustersnapshot_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ClusterSnapshotInitParameters struct { + + // The Identifier for the snapshot. + DBClusterSnapshotIdentifier *string `json:"dbClusterSnapshotIdentifier,omitempty" tf:"db_cluster_snapshot_identifier,omitempty"` + + // A map of tags to assign to the DB cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ClusterSnapshotObservation struct { // Allocated storage size in gigabytes (GB). @@ -71,9 +87,19 @@ type ClusterSnapshotObservation struct { type ClusterSnapshotParameters struct { // The DB Cluster Identifier from which to take the snapshot. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional DBClusterIdentifier *string `json:"dbClusterIdentifier,omitempty" tf:"db_cluster_identifier,omitempty"` + // Reference to a Cluster in rds to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierRef *v1.Reference `json:"dbClusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate dbClusterIdentifier. + // +kubebuilder:validation:Optional + DBClusterIdentifierSelector *v1.Selector `json:"dbClusterIdentifierSelector,omitempty" tf:"-"` + // The Identifier for the snapshot. // +kubebuilder:validation:Optional DBClusterSnapshotIdentifier *string `json:"dbClusterSnapshotIdentifier,omitempty" tf:"db_cluster_snapshot_identifier,omitempty"` @@ -96,6 +122,17 @@ type ClusterSnapshotParameters struct { type ClusterSnapshotSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ClusterSnapshotParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ClusterSnapshotInitParameters `json:"initProvider,omitempty"` } // ClusterSnapshotStatus defines the observed state of ClusterSnapshot. @@ -116,9 +153,8 @@ type ClusterSnapshotStatus struct { type ClusterSnapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier)",message="dbClusterIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterSnapshotIdentifier)",message="dbClusterSnapshotIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.dbClusterSnapshotIdentifier) || (has(self.initProvider) && has(self.initProvider.dbClusterSnapshotIdentifier))",message="spec.forProvider.dbClusterSnapshotIdentifier is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ClusterSnapshotSpec `json:"spec"` Status ClusterSnapshotStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_dbinstanceautomatedbackupsreplication_types.go b/apis/rds/v1alpha1/zz_dbinstanceautomatedbackupsreplication_types.go index 9869627..4ce759b 100755 --- a/apis/rds/v1alpha1/zz_dbinstanceautomatedbackupsreplication_types.go +++ b/apis/rds/v1alpha1/zz_dbinstanceautomatedbackupsreplication_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,15 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DBInstanceAutomatedBackupsReplicationInitParameters struct { + + // A URL that contains a Signature Version 4 signed request for the StartDBInstanceAutomatedBackupsReplication action to be called in the AWS Region of the source DB instance. + PreSignedURL *string `json:"preSignedUrl,omitempty" tf:"pre_signed_url,omitempty"` + + // The retention period for the replicated automated backups, defaults to 7. + RetentionPeriod *float64 `json:"retentionPeriod,omitempty" tf:"retention_period,omitempty"` +} + type DBInstanceAutomatedBackupsReplicationObservation struct { // The Amazon Resource Name (ARN) of the replicated automated backups. @@ -34,9 +47,18 @@ type DBInstanceAutomatedBackupsReplicationObservation struct { type DBInstanceAutomatedBackupsReplicationParameters struct { // The AWS KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination AWS Region, for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // A URL that contains a Signature Version 4 signed request for the StartDBInstanceAutomatedBackupsReplication action to be called in the AWS Region of the source DB instance. // +kubebuilder:validation:Optional PreSignedURL *string `json:"preSignedUrl,omitempty" tf:"pre_signed_url,omitempty"` @@ -51,14 +73,35 @@ type DBInstanceAutomatedBackupsReplicationParameters struct { RetentionPeriod *float64 `json:"retentionPeriod,omitempty" tf:"retention_period,omitempty"` // The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, arn:aws:rds:us-west-2:123456789012:db:mydatabase. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Instance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SourceDBInstanceArn *string `json:"sourceDbInstanceArn,omitempty" tf:"source_db_instance_arn,omitempty"` + + // Reference to a Instance in rds to populate sourceDbInstanceArn. + // +kubebuilder:validation:Optional + SourceDBInstanceArnRef *v1.Reference `json:"sourceDbInstanceArnRef,omitempty" tf:"-"` + + // Selector for a Instance in rds to populate sourceDbInstanceArn. + // +kubebuilder:validation:Optional + SourceDBInstanceArnSelector *v1.Selector `json:"sourceDbInstanceArnSelector,omitempty" tf:"-"` } // DBInstanceAutomatedBackupsReplicationSpec defines the desired state of DBInstanceAutomatedBackupsReplication type DBInstanceAutomatedBackupsReplicationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider DBInstanceAutomatedBackupsReplicationParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 DBInstanceAutomatedBackupsReplicationInitParameters `json:"initProvider,omitempty"` } // DBInstanceAutomatedBackupsReplicationStatus defines the observed state of DBInstanceAutomatedBackupsReplication. @@ -79,8 +122,7 @@ type DBInstanceAutomatedBackupsReplicationStatus struct { type DBInstanceAutomatedBackupsReplication struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.sourceDbInstanceArn)",message="sourceDbInstanceArn is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec DBInstanceAutomatedBackupsReplicationSpec `json:"spec"` Status DBInstanceAutomatedBackupsReplicationStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_dbsnapshotcopy_types.go b/apis/rds/v1alpha1/zz_dbsnapshotcopy_types.go index 5d2d38e..58bbee6 100755 --- a/apis/rds/v1alpha1/zz_dbsnapshotcopy_types.go +++ b/apis/rds/v1alpha1/zz_dbsnapshotcopy_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,33 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DBSnapshotCopyInitParameters struct { + + // Whether to copy existing tags. Defaults to false. + CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"` + + // The Destination region to place snapshot copy. + DestinationRegion *string `json:"destinationRegion,omitempty" tf:"destination_region,omitempty"` + + // The name of an option group to associate with the copy of the snapshot. + OptionGroupName *string `json:"optionGroupName,omitempty" tf:"option_group_name,omitempty"` + + // he URL that contains a Signature Version 4 signed request. + PresignedURL *string `json:"presignedUrl,omitempty" tf:"presigned_url,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The external custom Availability Zone. + TargetCustomAvailabilityZone *string `json:"targetCustomAvailabilityZone,omitempty" tf:"target_custom_availability_zone,omitempty"` + + // The Identifier for the snapshot. + TargetDBSnapshotIdentifier *string `json:"targetDbSnapshotIdentifier,omitempty" tf:"target_db_snapshot_identifier,omitempty"` +} + type DBSnapshotCopyObservation struct { // Specifies the allocated storage size in gigabytes (GB). @@ -97,9 +128,18 @@ type DBSnapshotCopyParameters struct { DestinationRegion *string `json:"destinationRegion,omitempty" tf:"destination_region,omitempty"` // KMS key ID. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + // The name of an option group to associate with the copy of the snapshot. // +kubebuilder:validation:Optional OptionGroupName *string `json:"optionGroupName,omitempty" tf:"option_group_name,omitempty"` @@ -114,9 +154,19 @@ type DBSnapshotCopyParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Snapshot identifier of the source snapshot. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Snapshot + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("db_snapshot_arn",true) // +kubebuilder:validation:Optional SourceDBSnapshotIdentifier *string `json:"sourceDbSnapshotIdentifier,omitempty" tf:"source_db_snapshot_identifier,omitempty"` + // Reference to a Snapshot in rds to populate sourceDbSnapshotIdentifier. + // +kubebuilder:validation:Optional + SourceDBSnapshotIdentifierRef *v1.Reference `json:"sourceDbSnapshotIdentifierRef,omitempty" tf:"-"` + + // Selector for a Snapshot in rds to populate sourceDbSnapshotIdentifier. + // +kubebuilder:validation:Optional + SourceDBSnapshotIdentifierSelector *v1.Selector `json:"sourceDbSnapshotIdentifierSelector,omitempty" tf:"-"` + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. // +kubebuilder:validation:Optional Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` @@ -138,6 +188,17 @@ type DBSnapshotCopyParameters struct { type DBSnapshotCopySpec struct { v1.ResourceSpec `json:",inline"` ForProvider DBSnapshotCopyParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 DBSnapshotCopyInitParameters `json:"initProvider,omitempty"` } // DBSnapshotCopyStatus defines the observed state of DBSnapshotCopy. @@ -158,9 +219,8 @@ type DBSnapshotCopyStatus struct { type DBSnapshotCopy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.sourceDbSnapshotIdentifier)",message="sourceDbSnapshotIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.targetDbSnapshotIdentifier)",message="targetDbSnapshotIdentifier is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.targetDbSnapshotIdentifier) || (has(self.initProvider) && has(self.initProvider.targetDbSnapshotIdentifier))",message="spec.forProvider.targetDbSnapshotIdentifier is a required parameter" Spec DBSnapshotCopySpec `json:"spec"` Status DBSnapshotCopyStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_eventsubscription_types.go b/apis/rds/v1alpha1/zz_eventsubscription_types.go index 99a116d..870032f 100755 --- a/apis/rds/v1alpha1/zz_eventsubscription_types.go +++ b/apis/rds/v1alpha1/zz_eventsubscription_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,27 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type EventSubscriptionInitParameters struct { + + // A boolean flag to enable/disable the subscription. Defaults to true. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + + // A list of event categories for a SourceType that you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run aws rds describe-event-categories. + EventCategories []*string `json:"eventCategories,omitempty" tf:"event_categories,omitempty"` + + // A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. + SourceIds []*string `json:"sourceIds,omitempty" tf:"source_ids,omitempty"` + + // The type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot. If not set, all sources will be subscribed to. + SourceType *string `json:"sourceType,omitempty" tf:"source_type,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type EventSubscriptionObservation struct { // The Amazon Resource Name of the RDS event notification subscription @@ -62,9 +87,19 @@ type EventSubscriptionParameters struct { Region *string `json:"region,omitempty" tf:"-"` // The SNS topic to send events to. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/sns/v1alpha1.Topic + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SnsTopic *string `json:"snsTopic,omitempty" tf:"sns_topic,omitempty"` + // Reference to a Topic in sns to populate snsTopic. + // +kubebuilder:validation:Optional + SnsTopicRef *v1.Reference `json:"snsTopicRef,omitempty" tf:"-"` + + // Selector for a Topic in sns to populate snsTopic. + // +kubebuilder:validation:Optional + SnsTopicSelector *v1.Selector `json:"snsTopicSelector,omitempty" tf:"-"` + // A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. // +kubebuilder:validation:Optional SourceIds []*string `json:"sourceIds,omitempty" tf:"source_ids,omitempty"` @@ -86,6 +121,17 @@ type EventSubscriptionParameters struct { type EventSubscriptionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider EventSubscriptionParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 EventSubscriptionInitParameters `json:"initProvider,omitempty"` } // EventSubscriptionStatus defines the observed state of EventSubscription. @@ -106,8 +152,7 @@ type EventSubscriptionStatus struct { type EventSubscription struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.snsTopic)",message="snsTopic is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec EventSubscriptionSpec `json:"spec"` Status EventSubscriptionStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_generated.deepcopy.go b/apis/rds/v1alpha1/zz_generated.deepcopy.go index c319ef6..9536262 100644 --- a/apis/rds/v1alpha1/zz_generated.deepcopy.go +++ b/apis/rds/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,46 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthInitParameters) DeepCopyInto(out *AuthInitParameters) { + *out = *in + if in.AuthScheme != nil { + in, out := &in.AuthScheme, &out.AuthScheme + *out = new(string) + **out = **in + } + if in.ClientPasswordAuthType != nil { + in, out := &in.ClientPasswordAuthType, &out.ClientPasswordAuthType + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.IAMAuth != nil { + in, out := &in.IAMAuth, &out.IAMAuth + *out = new(string) + **out = **in + } + if in.Username != nil { + in, out := &in.Username, &out.Username + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInitParameters. +func (in *AuthInitParameters) DeepCopy() *AuthInitParameters { + if in == nil { + return nil + } + out := new(AuthInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthObservation) DeepCopyInto(out *AuthObservation) { *out = *in @@ -87,6 +126,16 @@ func (in *AuthParameters) DeepCopyInto(out *AuthParameters) { *out = new(string) **out = **in } + if in.SecretArnRef != nil { + in, out := &in.SecretArnRef, &out.SecretArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SecretArnSelector != nil { + in, out := &in.SecretArnSelector, &out.SecretArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Username != nil { in, out := &in.Username, &out.Username *out = new(string) @@ -104,6 +153,26 @@ func (in *AuthParameters) DeepCopy() *AuthParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlueGreenUpdateInitParameters) DeepCopyInto(out *BlueGreenUpdateInitParameters) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueGreenUpdateInitParameters. +func (in *BlueGreenUpdateInitParameters) DeepCopy() *BlueGreenUpdateInitParameters { + if in == nil { + return nil + } + out := new(BlueGreenUpdateInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BlueGreenUpdateObservation) DeepCopyInto(out *BlueGreenUpdateObservation) { *out = *in @@ -198,6 +267,31 @@ func (in *ClusterActivityStream) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterActivityStreamInitParameters) DeepCopyInto(out *ClusterActivityStreamInitParameters) { + *out = *in + if in.EngineNativeAuditFieldsIncluded != nil { + in, out := &in.EngineNativeAuditFieldsIncluded, &out.EngineNativeAuditFieldsIncluded + *out = new(bool) + **out = **in + } + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterActivityStreamInitParameters. +func (in *ClusterActivityStreamInitParameters) DeepCopy() *ClusterActivityStreamInitParameters { + if in == nil { + return nil + } + out := new(ClusterActivityStreamInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterActivityStreamList) DeepCopyInto(out *ClusterActivityStreamList) { *out = *in @@ -288,6 +382,16 @@ func (in *ClusterActivityStreamParameters) DeepCopyInto(out *ClusterActivityStre *out = new(string) **out = **in } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Mode != nil { in, out := &in.Mode, &out.Mode *out = new(string) @@ -303,6 +407,16 @@ func (in *ClusterActivityStreamParameters) DeepCopyInto(out *ClusterActivityStre *out = new(string) **out = **in } + if in.ResourceArnRef != nil { + in, out := &in.ResourceArnRef, &out.ResourceArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ResourceArnSelector != nil { + in, out := &in.ResourceArnSelector, &out.ResourceArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterActivityStreamParameters. @@ -320,6 +434,7 @@ func (in *ClusterActivityStreamSpec) DeepCopyInto(out *ClusterActivityStreamSpec *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterActivityStreamSpec. @@ -376,6 +491,80 @@ func (in *ClusterEndpoint) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterEndpointInitParameters) DeepCopyInto(out *ClusterEndpointInitParameters) { + *out = *in + if in.CustomEndpointType != nil { + in, out := &in.CustomEndpointType, &out.CustomEndpointType + *out = new(string) + **out = **in + } + if in.ExcludedMembers != nil { + in, out := &in.ExcludedMembers, &out.ExcludedMembers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.StaticMembers != nil { + in, out := &in.StaticMembers, &out.StaticMembers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterEndpointInitParameters. +func (in *ClusterEndpointInitParameters) DeepCopy() *ClusterEndpointInitParameters { + if in == nil { + return nil + } + out := new(ClusterEndpointInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterEndpointList) DeepCopyInto(out *ClusterEndpointList) { *out = *in @@ -466,7 +655,8 @@ func (in *ClusterEndpointObservation) DeepCopyInto(out *ClusterEndpointObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -481,7 +671,8 @@ func (in *ClusterEndpointObservation) DeepCopyInto(out *ClusterEndpointObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -508,6 +699,16 @@ func (in *ClusterEndpointParameters) DeepCopyInto(out *ClusterEndpointParameters *out = new(string) **out = **in } + if in.ClusterIdentifierRef != nil { + in, out := &in.ClusterIdentifierRef, &out.ClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ClusterIdentifierSelector != nil { + in, out := &in.ClusterIdentifierSelector, &out.ClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.CustomEndpointType != nil { in, out := &in.CustomEndpointType, &out.CustomEndpointType *out = new(string) @@ -548,7 +749,8 @@ func (in *ClusterEndpointParameters) DeepCopyInto(out *ClusterEndpointParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -563,7 +765,8 @@ func (in *ClusterEndpointParameters) DeepCopyInto(out *ClusterEndpointParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -587,6 +790,7 @@ func (in *ClusterEndpointSpec) DeepCopyInto(out *ClusterEndpointSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterEndpointSpec. @@ -617,180 +821,154 @@ func (in *ClusterEndpointStatus) DeepCopy() *ClusterEndpointStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstance) DeepCopyInto(out *ClusterInstance) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstance. -func (in *ClusterInstance) DeepCopy() *ClusterInstance { - if in == nil { - return nil - } - out := new(ClusterInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterInstance) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstanceList) DeepCopyInto(out *ClusterInstanceList) { +func (in *ClusterInitParameters) DeepCopyInto(out *ClusterInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceList. -func (in *ClusterInstanceList) DeepCopy() *ClusterInstanceList { - if in == nil { - return nil + if in.AllocatedStorage != nil { + in, out := &in.AllocatedStorage, &out.AllocatedStorage + *out = new(float64) + **out = **in } - out := new(ClusterInstanceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterInstanceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.AllowMajorVersionUpgrade != nil { + in, out := &in.AllowMajorVersionUpgrade, &out.AllowMajorVersionUpgrade + *out = new(bool) + **out = **in } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservation) { - *out = *in if in.ApplyImmediately != nil { in, out := &in.ApplyImmediately, &out.ApplyImmediately *out = new(bool) **out = **in } - if in.Arn != nil { - in, out := &in.Arn, &out.Arn - *out = new(string) + if in.AvailabilityZones != nil { + in, out := &in.AvailabilityZones, &out.AvailabilityZones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.BacktrackWindow != nil { + in, out := &in.BacktrackWindow, &out.BacktrackWindow + *out = new(float64) **out = **in } - if in.AutoMinorVersionUpgrade != nil { - in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade - *out = new(bool) + if in.BackupRetentionPeriod != nil { + in, out := &in.BackupRetentionPeriod, &out.BackupRetentionPeriod + *out = new(float64) **out = **in } - if in.AvailabilityZone != nil { - in, out := &in.AvailabilityZone, &out.AvailabilityZone - *out = new(string) + if in.ClusterMembers != nil { + in, out := &in.ClusterMembers, &out.ClusterMembers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.CopyTagsToSnapshot != nil { + in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot + *out = new(bool) **out = **in } - if in.CACertIdentifier != nil { - in, out := &in.CACertIdentifier, &out.CACertIdentifier + if in.DBClusterInstanceClass != nil { + in, out := &in.DBClusterInstanceClass, &out.DBClusterInstanceClass *out = new(string) **out = **in } - if in.ClusterIdentifier != nil { - in, out := &in.ClusterIdentifier, &out.ClusterIdentifier + if in.DBClusterParameterGroupName != nil { + in, out := &in.DBClusterParameterGroupName, &out.DBClusterParameterGroupName *out = new(string) **out = **in } - if in.CopyTagsToSnapshot != nil { - in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot - *out = new(bool) + if in.DBInstanceParameterGroupName != nil { + in, out := &in.DBInstanceParameterGroupName, &out.DBInstanceParameterGroupName + *out = new(string) **out = **in } - if in.DBParameterGroupName != nil { - in, out := &in.DBParameterGroupName, &out.DBParameterGroupName + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName *out = new(string) **out = **in } - if in.DBSubnetGroupName != nil { - in, out := &in.DBSubnetGroupName, &out.DBSubnetGroupName - *out = new(string) + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) **out = **in } - if in.DbiResourceID != nil { - in, out := &in.DbiResourceID, &out.DbiResourceID - *out = new(string) + if in.EnableGlobalWriteForwarding != nil { + in, out := &in.EnableGlobalWriteForwarding, &out.EnableGlobalWriteForwarding + *out = new(bool) **out = **in } - if in.Endpoint != nil { - in, out := &in.Endpoint, &out.Endpoint - *out = new(string) + if in.EnableHTTPEndpoint != nil { + in, out := &in.EnableHTTPEndpoint, &out.EnableHTTPEndpoint + *out = new(bool) **out = **in } + if in.EnabledCloudwatchLogsExports != nil { + in, out := &in.EnabledCloudwatchLogsExports, &out.EnabledCloudwatchLogsExports + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.Engine != nil { in, out := &in.Engine, &out.Engine *out = new(string) **out = **in } - if in.EngineVersion != nil { - in, out := &in.EngineVersion, &out.EngineVersion + if in.EngineMode != nil { + in, out := &in.EngineMode, &out.EngineMode *out = new(string) **out = **in } - if in.EngineVersionActual != nil { - in, out := &in.EngineVersionActual, &out.EngineVersionActual + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier *out = new(string) **out = **in } - if in.InstanceClass != nil { - in, out := &in.InstanceClass, &out.InstanceClass + if in.GlobalClusterIdentifier != nil { + in, out := &in.GlobalClusterIdentifier, &out.GlobalClusterIdentifier *out = new(string) **out = **in } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID - *out = new(string) + if in.IAMDatabaseAuthenticationEnabled != nil { + in, out := &in.IAMDatabaseAuthenticationEnabled, &out.IAMDatabaseAuthenticationEnabled + *out = new(bool) **out = **in } - if in.MonitoringInterval != nil { - in, out := &in.MonitoringInterval, &out.MonitoringInterval + if in.Iops != nil { + in, out := &in.Iops, &out.Iops *out = new(float64) **out = **in } - if in.MonitoringRoleArn != nil { - in, out := &in.MonitoringRoleArn, &out.MonitoringRoleArn - *out = new(string) - **out = **in - } - if in.NetworkType != nil { - in, out := &in.NetworkType, &out.NetworkType - *out = new(string) - **out = **in - } - if in.PerformanceInsightsEnabled != nil { - in, out := &in.PerformanceInsightsEnabled, &out.PerformanceInsightsEnabled + if in.ManageMasterUserPassword != nil { + in, out := &in.ManageMasterUserPassword, &out.ManageMasterUserPassword *out = new(bool) **out = **in } - if in.PerformanceInsightsKMSKeyID != nil { - in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID + if in.MasterUsername != nil { + in, out := &in.MasterUsername, &out.MasterUsername *out = new(string) **out = **in } - if in.PerformanceInsightsRetentionPeriod != nil { - in, out := &in.PerformanceInsightsRetentionPeriod, &out.PerformanceInsightsRetentionPeriod - *out = new(float64) + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) **out = **in } if in.Port != nil { @@ -808,21 +986,64 @@ func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservati *out = new(string) **out = **in } - if in.PromotionTier != nil { - in, out := &in.PromotionTier, &out.PromotionTier - *out = new(float64) + if in.ReplicationSourceIdentifier != nil { + in, out := &in.ReplicationSourceIdentifier, &out.ReplicationSourceIdentifier + *out = new(string) **out = **in } - if in.PubliclyAccessible != nil { - in, out := &in.PubliclyAccessible, &out.PubliclyAccessible + if in.RestoreToPointInTime != nil { + in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime + *out = make([]ClusterRestoreToPointInTimeInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.S3Import != nil { + in, out := &in.S3Import, &out.S3Import + *out = make([]ClusterS3ImportInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ScalingConfiguration != nil { + in, out := &in.ScalingConfiguration, &out.ScalingConfiguration + *out = make([]ScalingConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Serverlessv2ScalingConfiguration != nil { + in, out := &in.Serverlessv2ScalingConfiguration, &out.Serverlessv2ScalingConfiguration + *out = make([]Serverlessv2ScalingConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SkipFinalSnapshot != nil { + in, out := &in.SkipFinalSnapshot, &out.SkipFinalSnapshot *out = new(bool) **out = **in } + if in.SnapshotIdentifier != nil { + in, out := &in.SnapshotIdentifier, &out.SnapshotIdentifier + *out = new(string) + **out = **in + } + if in.SourceRegion != nil { + in, out := &in.SourceRegion, &out.SourceRegion + *out = new(string) + **out = **in + } if in.StorageEncrypted != nil { in, out := &in.StorageEncrypted, &out.StorageEncrypted *out = new(bool) **out = **in } + if in.StorageType != nil { + in, out := &in.StorageType, &out.StorageType + *out = new(string) + **out = **in + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -831,7 +1052,8 @@ func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -846,32 +1068,55 @@ func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservati if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } - if in.Writer != nil { - in, out := &in.Writer, &out.Writer - *out = new(bool) - **out = **in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitParameters. +func (in *ClusterInitParameters) DeepCopy() *ClusterInitParameters { + if in == nil { + return nil } + out := new(ClusterInitParameters) + in.DeepCopyInto(out) + return out } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceObservation. -func (in *ClusterInstanceObservation) DeepCopy() *ClusterInstanceObservation { +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInstance) DeepCopyInto(out *ClusterInstance) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstance. +func (in *ClusterInstance) DeepCopy() *ClusterInstance { if in == nil { return nil } - out := new(ClusterInstanceObservation) + out := new(ClusterInstance) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterInstance) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters) { +func (in *ClusterInstanceInitParameters) DeepCopyInto(out *ClusterInstanceInitParameters) { *out = *in if in.ApplyImmediately != nil { in, out := &in.ApplyImmediately, &out.ApplyImmediately @@ -893,11 +1138,6 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters *out = new(string) **out = **in } - if in.ClusterIdentifier != nil { - in, out := &in.ClusterIdentifier, &out.ClusterIdentifier - *out = new(string) - **out = **in - } if in.CopyTagsToSnapshot != nil { in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot *out = new(bool) @@ -908,21 +1148,6 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters *out = new(string) **out = **in } - if in.DBSubnetGroupName != nil { - in, out := &in.DBSubnetGroupName, &out.DBSubnetGroupName - *out = new(string) - **out = **in - } - if in.DBSubnetGroupNameRef != nil { - in, out := &in.DBSubnetGroupNameRef, &out.DBSubnetGroupNameRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.DBSubnetGroupNameSelector != nil { - in, out := &in.DBSubnetGroupNameSelector, &out.DBSubnetGroupNameSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } if in.Engine != nil { in, out := &in.Engine, &out.Engine *out = new(string) @@ -943,31 +1168,11 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters *out = new(float64) **out = **in } - if in.MonitoringRoleArn != nil { - in, out := &in.MonitoringRoleArn, &out.MonitoringRoleArn - *out = new(string) - **out = **in - } if in.PerformanceInsightsEnabled != nil { in, out := &in.PerformanceInsightsEnabled, &out.PerformanceInsightsEnabled *out = new(bool) **out = **in } - if in.PerformanceInsightsKMSKeyID != nil { - in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID - *out = new(string) - **out = **in - } - if in.PerformanceInsightsKMSKeyIDRef != nil { - in, out := &in.PerformanceInsightsKMSKeyIDRef, &out.PerformanceInsightsKMSKeyIDRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.PerformanceInsightsKMSKeyIDSelector != nil { - in, out := &in.PerformanceInsightsKMSKeyIDSelector, &out.PerformanceInsightsKMSKeyIDSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } if in.PerformanceInsightsRetentionPeriod != nil { in, out := &in.PerformanceInsightsRetentionPeriod, &out.PerformanceInsightsRetentionPeriod *out = new(float64) @@ -993,11 +1198,6 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters *out = new(bool) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region - *out = new(string) - **out = **in - } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -1006,7 +1206,8 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1021,7 +1222,8 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1030,76 +1232,42 @@ func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceParameters. -func (in *ClusterInstanceParameters) DeepCopy() *ClusterInstanceParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceInitParameters. +func (in *ClusterInstanceInitParameters) DeepCopy() *ClusterInstanceInitParameters { if in == nil { return nil } - out := new(ClusterInstanceParameters) + out := new(ClusterInstanceInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstanceSpec) DeepCopyInto(out *ClusterInstanceSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceSpec. -func (in *ClusterInstanceSpec) DeepCopy() *ClusterInstanceSpec { - if in == nil { - return nil - } - out := new(ClusterInstanceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterInstanceStatus) DeepCopyInto(out *ClusterInstanceStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceStatus. -func (in *ClusterInstanceStatus) DeepCopy() *ClusterInstanceStatus { - if in == nil { - return nil - } - out := new(ClusterInstanceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterList) DeepCopyInto(out *ClusterList) { +func (in *ClusterInstanceList) DeepCopyInto(out *ClusterInstanceList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Cluster, len(*in)) + *out = make([]ClusterInstance, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. -func (in *ClusterList) DeepCopy() *ClusterList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceList. +func (in *ClusterInstanceList) DeepCopy() *ClusterInstanceList { if in == nil { return nil } - out := new(ClusterList) + out := new(ClusterInstanceList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterList) DeepCopyObject() runtime.Object { +func (in *ClusterInstanceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1107,63 +1275,8 @@ func (in *ClusterList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterMasterUserSecretObservation) DeepCopyInto(out *ClusterMasterUserSecretObservation) { - *out = *in - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID - *out = new(string) - **out = **in - } - if in.SecretArn != nil { - in, out := &in.SecretArn, &out.SecretArn - *out = new(string) - **out = **in - } - if in.SecretStatus != nil { - in, out := &in.SecretStatus, &out.SecretStatus - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMasterUserSecretObservation. -func (in *ClusterMasterUserSecretObservation) DeepCopy() *ClusterMasterUserSecretObservation { - if in == nil { - return nil - } - out := new(ClusterMasterUserSecretObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterMasterUserSecretParameters) DeepCopyInto(out *ClusterMasterUserSecretParameters) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMasterUserSecretParameters. -func (in *ClusterMasterUserSecretParameters) DeepCopy() *ClusterMasterUserSecretParameters { - if in == nil { - return nil - } - out := new(ClusterMasterUserSecretParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { +func (in *ClusterInstanceObservation) DeepCopyInto(out *ClusterInstanceObservation) { *out = *in - if in.AllocatedStorage != nil { - in, out := &in.AllocatedStorage, &out.AllocatedStorage - *out = new(float64) - **out = **in - } - if in.AllowMajorVersionUpgrade != nil { - in, out := &in.AllowMajorVersionUpgrade, &out.AllowMajorVersionUpgrade - *out = new(bool) - **out = **in - } if in.ApplyImmediately != nil { in, out := &in.ApplyImmediately, &out.ApplyImmediately *out = new(bool) @@ -1174,40 +1287,23 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(string) **out = **in } - if in.AvailabilityZones != nil { - in, out := &in.AvailabilityZones, &out.AvailabilityZones - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } - if in.BacktrackWindow != nil { - in, out := &in.BacktrackWindow, &out.BacktrackWindow - *out = new(float64) + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(bool) **out = **in } - if in.BackupRetentionPeriod != nil { - in, out := &in.BackupRetentionPeriod, &out.BackupRetentionPeriod - *out = new(float64) + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) **out = **in } - if in.ClusterMembers != nil { - in, out := &in.ClusterMembers, &out.ClusterMembers - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.CACertIdentifier != nil { + in, out := &in.CACertIdentifier, &out.CACertIdentifier + *out = new(string) + **out = **in } - if in.ClusterResourceID != nil { - in, out := &in.ClusterResourceID, &out.ClusterResourceID + if in.ClusterIdentifier != nil { + in, out := &in.ClusterIdentifier, &out.ClusterIdentifier *out = new(string) **out = **in } @@ -1216,18 +1312,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(bool) **out = **in } - if in.DBClusterInstanceClass != nil { - in, out := &in.DBClusterInstanceClass, &out.DBClusterInstanceClass - *out = new(string) - **out = **in - } - if in.DBClusterParameterGroupName != nil { - in, out := &in.DBClusterParameterGroupName, &out.DBClusterParameterGroupName - *out = new(string) - **out = **in - } - if in.DBInstanceParameterGroupName != nil { - in, out := &in.DBInstanceParameterGroupName, &out.DBInstanceParameterGroupName + if in.DBParameterGroupName != nil { + in, out := &in.DBParameterGroupName, &out.DBParameterGroupName *out = new(string) **out = **in } @@ -1236,37 +1322,11 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(string) **out = **in } - if in.DatabaseName != nil { - in, out := &in.DatabaseName, &out.DatabaseName + if in.DbiResourceID != nil { + in, out := &in.DbiResourceID, &out.DbiResourceID *out = new(string) **out = **in } - if in.DeletionProtection != nil { - in, out := &in.DeletionProtection, &out.DeletionProtection - *out = new(bool) - **out = **in - } - if in.EnableGlobalWriteForwarding != nil { - in, out := &in.EnableGlobalWriteForwarding, &out.EnableGlobalWriteForwarding - *out = new(bool) - **out = **in - } - if in.EnableHTTPEndpoint != nil { - in, out := &in.EnableHTTPEndpoint, &out.EnableHTTPEndpoint - *out = new(bool) - **out = **in - } - if in.EnabledCloudwatchLogsExports != nil { - in, out := &in.EnabledCloudwatchLogsExports, &out.EnabledCloudwatchLogsExports - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } if in.Endpoint != nil { in, out := &in.Endpoint, &out.Endpoint *out = new(string) @@ -1277,11 +1337,6 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(string) **out = **in } - if in.EngineMode != nil { - in, out := &in.EngineMode, &out.EngineMode - *out = new(string) - **out = **in - } if in.EngineVersion != nil { in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) @@ -1292,77 +1347,49 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(string) **out = **in } - if in.FinalSnapshotIdentifier != nil { - in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier + if in.ID != nil { + in, out := &in.ID, &out.ID *out = new(string) **out = **in } - if in.GlobalClusterIdentifier != nil { - in, out := &in.GlobalClusterIdentifier, &out.GlobalClusterIdentifier + if in.InstanceClass != nil { + in, out := &in.InstanceClass, &out.InstanceClass *out = new(string) **out = **in } - if in.HostedZoneID != nil { - in, out := &in.HostedZoneID, &out.HostedZoneID + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID *out = new(string) **out = **in } - if in.IAMDatabaseAuthenticationEnabled != nil { - in, out := &in.IAMDatabaseAuthenticationEnabled, &out.IAMDatabaseAuthenticationEnabled - *out = new(bool) + if in.MonitoringInterval != nil { + in, out := &in.MonitoringInterval, &out.MonitoringInterval + *out = new(float64) **out = **in } - if in.IAMRoles != nil { - in, out := &in.IAMRoles, &out.IAMRoles - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.MonitoringRoleArn != nil { + in, out := &in.MonitoringRoleArn, &out.MonitoringRoleArn *out = new(string) **out = **in } - if in.Iops != nil { - in, out := &in.Iops, &out.Iops - *out = new(float64) - **out = **in - } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType *out = new(string) **out = **in } - if in.ManageMasterUserPassword != nil { - in, out := &in.ManageMasterUserPassword, &out.ManageMasterUserPassword + if in.PerformanceInsightsEnabled != nil { + in, out := &in.PerformanceInsightsEnabled, &out.PerformanceInsightsEnabled *out = new(bool) **out = **in } - if in.MasterUserSecret != nil { - in, out := &in.MasterUserSecret, &out.MasterUserSecret - *out = make([]ClusterMasterUserSecretObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.MasterUserSecretKMSKeyID != nil { - in, out := &in.MasterUserSecretKMSKeyID, &out.MasterUserSecretKMSKeyID - *out = new(string) - **out = **in - } - if in.MasterUsername != nil { - in, out := &in.MasterUsername, &out.MasterUsername + if in.PerformanceInsightsKMSKeyID != nil { + in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID *out = new(string) **out = **in } - if in.NetworkType != nil { - in, out := &in.NetworkType, &out.NetworkType - *out = new(string) + if in.PerformanceInsightsRetentionPeriod != nil { + in, out := &in.PerformanceInsightsRetentionPeriod, &out.PerformanceInsightsRetentionPeriod + *out = new(float64) **out = **in } if in.Port != nil { @@ -1380,69 +1407,21 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = new(string) **out = **in } - if in.ReaderEndpoint != nil { - in, out := &in.ReaderEndpoint, &out.ReaderEndpoint - *out = new(string) + if in.PromotionTier != nil { + in, out := &in.PromotionTier, &out.PromotionTier + *out = new(float64) **out = **in } - if in.ReplicationSourceIdentifier != nil { - in, out := &in.ReplicationSourceIdentifier, &out.ReplicationSourceIdentifier - *out = new(string) - **out = **in - } - if in.RestoreToPointInTime != nil { - in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime - *out = make([]ClusterRestoreToPointInTimeObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.S3Import != nil { - in, out := &in.S3Import, &out.S3Import - *out = make([]ClusterS3ImportObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ScalingConfiguration != nil { - in, out := &in.ScalingConfiguration, &out.ScalingConfiguration - *out = make([]ScalingConfigurationObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Serverlessv2ScalingConfiguration != nil { - in, out := &in.Serverlessv2ScalingConfiguration, &out.Serverlessv2ScalingConfiguration - *out = make([]Serverlessv2ScalingConfigurationObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SkipFinalSnapshot != nil { - in, out := &in.SkipFinalSnapshot, &out.SkipFinalSnapshot + if in.PubliclyAccessible != nil { + in, out := &in.PubliclyAccessible, &out.PubliclyAccessible *out = new(bool) **out = **in } - if in.SnapshotIdentifier != nil { - in, out := &in.SnapshotIdentifier, &out.SnapshotIdentifier - *out = new(string) - **out = **in - } - if in.SourceRegion != nil { - in, out := &in.SourceRegion, &out.SourceRegion - *out = new(string) - **out = **in - } if in.StorageEncrypted != nil { in, out := &in.StorageEncrypted, &out.StorageEncrypted *out = new(bool) **out = **in } - if in.StorageType != nil { - in, out := &in.StorageType, &out.StorageType - *out = new(string) - **out = **in - } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -1451,7 +1430,8 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1466,246 +1446,173 @@ func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } - if in.VPCSecurityGroupIds != nil { - in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObservation. -func (in *ClusterObservation) DeepCopy() *ClusterObservation { - if in == nil { - return nil + if in.Writer != nil { + in, out := &in.Writer, &out.Writer + *out = new(bool) + **out = **in } - out := new(ClusterObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroup) DeepCopyInto(out *ClusterParameterGroup) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroup. -func (in *ClusterParameterGroup) DeepCopy() *ClusterParameterGroup { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceObservation. +func (in *ClusterInstanceObservation) DeepCopy() *ClusterInstanceObservation { if in == nil { return nil } - out := new(ClusterParameterGroup) + out := new(ClusterInstanceObservation) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterParameterGroup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupList) DeepCopyInto(out *ClusterParameterGroupList) { +func (in *ClusterInstanceParameters) DeepCopyInto(out *ClusterInstanceParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterParameterGroup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupList. -func (in *ClusterParameterGroupList) DeepCopy() *ClusterParameterGroupList { - if in == nil { - return nil - } - out := new(ClusterParameterGroupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterParameterGroupList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupObservation) DeepCopyInto(out *ClusterParameterGroupObservation) { - *out = *in - if in.Arn != nil { - in, out := &in.Arn, &out.Arn - *out = new(string) + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(bool) **out = **in } - if in.Description != nil { - in, out := &in.Description, &out.Description + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone *out = new(string) **out = **in } - if in.Family != nil { - in, out := &in.Family, &out.Family + if in.CACertIdentifier != nil { + in, out := &in.CACertIdentifier, &out.CACertIdentifier *out = new(string) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.ClusterIdentifier != nil { + in, out := &in.ClusterIdentifier, &out.ClusterIdentifier *out = new(string) **out = **in } - if in.Parameter != nil { - in, out := &in.Parameter, &out.Parameter - *out = make([]ClusterParameterGroupParameterObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } - } - if in.TagsAll != nil { - in, out := &in.TagsAll, &out.TagsAll - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.ClusterIdentifierRef != nil { + in, out := &in.ClusterIdentifierRef, &out.ClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupObservation. -func (in *ClusterParameterGroupObservation) DeepCopy() *ClusterParameterGroupObservation { - if in == nil { - return nil + if in.ClusterIdentifierSelector != nil { + in, out := &in.ClusterIdentifierSelector, &out.ClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) } - out := new(ClusterParameterGroupObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupParameterObservation) DeepCopyInto(out *ClusterParameterGroupParameterObservation) { - *out = *in - if in.ApplyMethod != nil { - in, out := &in.ApplyMethod, &out.ApplyMethod - *out = new(string) + if in.CopyTagsToSnapshot != nil { + in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot + *out = new(bool) **out = **in } - if in.Name != nil { - in, out := &in.Name, &out.Name + if in.DBParameterGroupName != nil { + in, out := &in.DBParameterGroupName, &out.DBParameterGroupName *out = new(string) **out = **in } - if in.Value != nil { - in, out := &in.Value, &out.Value + if in.DBSubnetGroupName != nil { + in, out := &in.DBSubnetGroupName, &out.DBSubnetGroupName *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameterObservation. -func (in *ClusterParameterGroupParameterObservation) DeepCopy() *ClusterParameterGroupParameterObservation { - if in == nil { - return nil + if in.DBSubnetGroupNameRef != nil { + in, out := &in.DBSubnetGroupNameRef, &out.DBSubnetGroupNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) } - out := new(ClusterParameterGroupParameterObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupParameterParameters) DeepCopyInto(out *ClusterParameterGroupParameterParameters) { - *out = *in - if in.ApplyMethod != nil { - in, out := &in.ApplyMethod, &out.ApplyMethod + if in.DBSubnetGroupNameSelector != nil { + in, out := &in.DBSubnetGroupNameSelector, &out.DBSubnetGroupNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine *out = new(string) **out = **in } - if in.Name != nil { - in, out := &in.Name, &out.Name + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) **out = **in } - if in.Value != nil { - in, out := &in.Value, &out.Value + if in.InstanceClass != nil { + in, out := &in.InstanceClass, &out.InstanceClass *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameterParameters. -func (in *ClusterParameterGroupParameterParameters) DeepCopy() *ClusterParameterGroupParameterParameters { - if in == nil { - return nil + if in.MonitoringInterval != nil { + in, out := &in.MonitoringInterval, &out.MonitoringInterval + *out = new(float64) + **out = **in } - out := new(ClusterParameterGroupParameterParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGroupParameters) { - *out = *in - if in.Description != nil { - in, out := &in.Description, &out.Description + if in.MonitoringRoleArn != nil { + in, out := &in.MonitoringRoleArn, &out.MonitoringRoleArn *out = new(string) **out = **in } - if in.Family != nil { - in, out := &in.Family, &out.Family + if in.MonitoringRoleArnRef != nil { + in, out := &in.MonitoringRoleArnRef, &out.MonitoringRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.MonitoringRoleArnSelector != nil { + in, out := &in.MonitoringRoleArnSelector, &out.MonitoringRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.PerformanceInsightsEnabled != nil { + in, out := &in.PerformanceInsightsEnabled, &out.PerformanceInsightsEnabled + *out = new(bool) + **out = **in + } + if in.PerformanceInsightsKMSKeyID != nil { + in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID *out = new(string) **out = **in } - if in.Parameter != nil { - in, out := &in.Parameter, &out.Parameter - *out = make([]ClusterParameterGroupParameterParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.PerformanceInsightsKMSKeyIDRef != nil { + in, out := &in.PerformanceInsightsKMSKeyIDRef, &out.PerformanceInsightsKMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.PerformanceInsightsKMSKeyIDSelector != nil { + in, out := &in.PerformanceInsightsKMSKeyIDSelector, &out.PerformanceInsightsKMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.PerformanceInsightsRetentionPeriod != nil { + in, out := &in.PerformanceInsightsRetentionPeriod, &out.PerformanceInsightsRetentionPeriod + *out = new(float64) + **out = **in + } + if in.PreferredBackupWindow != nil { + in, out := &in.PreferredBackupWindow, &out.PreferredBackupWindow + *out = new(string) + **out = **in + } + if in.PreferredMaintenanceWindow != nil { + in, out := &in.PreferredMaintenanceWindow, &out.PreferredMaintenanceWindow + *out = new(string) + **out = **in + } + if in.PromotionTier != nil { + in, out := &in.PromotionTier, &out.PromotionTier + *out = new(float64) + **out = **in + } + if in.PubliclyAccessible != nil { + in, out := &in.PubliclyAccessible, &out.PubliclyAccessible + *out = new(bool) + **out = **in } if in.Region != nil { in, out := &in.Region, &out.Region @@ -1720,7 +1627,8 @@ func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGro if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1735,7 +1643,8 @@ func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGro if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -1744,52 +1653,145 @@ func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGro } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameters. -func (in *ClusterParameterGroupParameters) DeepCopy() *ClusterParameterGroupParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceParameters. +func (in *ClusterInstanceParameters) DeepCopy() *ClusterInstanceParameters { if in == nil { return nil } - out := new(ClusterParameterGroupParameters) + out := new(ClusterInstanceParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupSpec) DeepCopyInto(out *ClusterParameterGroupSpec) { +func (in *ClusterInstanceSpec) DeepCopyInto(out *ClusterInstanceSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupSpec. -func (in *ClusterParameterGroupSpec) DeepCopy() *ClusterParameterGroupSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceSpec. +func (in *ClusterInstanceSpec) DeepCopy() *ClusterInstanceSpec { if in == nil { return nil } - out := new(ClusterParameterGroupSpec) + out := new(ClusterInstanceSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameterGroupStatus) DeepCopyInto(out *ClusterParameterGroupStatus) { +func (in *ClusterInstanceStatus) DeepCopyInto(out *ClusterInstanceStatus) { *out = *in in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupStatus. -func (in *ClusterParameterGroupStatus) DeepCopy() *ClusterParameterGroupStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceStatus. +func (in *ClusterInstanceStatus) DeepCopy() *ClusterInstanceStatus { if in == nil { return nil } - out := new(ClusterParameterGroupStatus) + out := new(ClusterInstanceStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMasterUserSecretInitParameters) DeepCopyInto(out *ClusterMasterUserSecretInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMasterUserSecretInitParameters. +func (in *ClusterMasterUserSecretInitParameters) DeepCopy() *ClusterMasterUserSecretInitParameters { + if in == nil { + return nil + } + out := new(ClusterMasterUserSecretInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMasterUserSecretObservation) DeepCopyInto(out *ClusterMasterUserSecretObservation) { + *out = *in + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.SecretArn != nil { + in, out := &in.SecretArn, &out.SecretArn + *out = new(string) + **out = **in + } + if in.SecretStatus != nil { + in, out := &in.SecretStatus, &out.SecretStatus + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMasterUserSecretObservation. +func (in *ClusterMasterUserSecretObservation) DeepCopy() *ClusterMasterUserSecretObservation { + if in == nil { + return nil + } + out := new(ClusterMasterUserSecretObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterMasterUserSecretParameters) DeepCopyInto(out *ClusterMasterUserSecretParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMasterUserSecretParameters. +func (in *ClusterMasterUserSecretParameters) DeepCopy() *ClusterMasterUserSecretParameters { + if in == nil { + return nil + } + out := new(ClusterMasterUserSecretParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterObservation) DeepCopyInto(out *ClusterObservation) { *out = *in if in.AllocatedStorage != nil { in, out := &in.AllocatedStorage, &out.AllocatedStorage @@ -1806,6 +1808,11 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(bool) **out = **in } + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } if in.AvailabilityZones != nil { in, out := &in.AvailabilityZones, &out.AvailabilityZones *out = make([]*string, len(*in)) @@ -1838,6 +1845,11 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { } } } + if in.ClusterResourceID != nil { + in, out := &in.ClusterResourceID, &out.ClusterResourceID + *out = new(string) + **out = **in + } if in.CopyTagsToSnapshot != nil { in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot *out = new(bool) @@ -1863,16 +1875,6 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } - if in.DBSubnetGroupNameRef != nil { - in, out := &in.DBSubnetGroupNameRef, &out.DBSubnetGroupNameRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.DBSubnetGroupNameSelector != nil { - in, out := &in.DBSubnetGroupNameSelector, &out.DBSubnetGroupNameSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } if in.DatabaseName != nil { in, out := &in.DatabaseName, &out.DatabaseName *out = new(string) @@ -1904,6 +1906,11 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { } } } + if in.Endpoint != nil { + in, out := &in.Endpoint, &out.Endpoint + *out = new(string) + **out = **in + } if in.Engine != nil { in, out := &in.Engine, &out.Engine *out = new(string) @@ -1919,6 +1926,11 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.EngineVersionActual != nil { + in, out := &in.EngineVersionActual, &out.EngineVersionActual + *out = new(string) + **out = **in + } if in.FinalSnapshotIdentifier != nil { in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier *out = new(string) @@ -1929,11 +1941,32 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } + if in.HostedZoneID != nil { + in, out := &in.HostedZoneID, &out.HostedZoneID + *out = new(string) + **out = **in + } if in.IAMDatabaseAuthenticationEnabled != nil { in, out := &in.IAMDatabaseAuthenticationEnabled, &out.IAMDatabaseAuthenticationEnabled *out = new(bool) **out = **in } + if in.IAMRoles != nil { + in, out := &in.IAMRoles, &out.IAMRoles + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } if in.Iops != nil { in, out := &in.Iops, &out.Iops *out = new(float64) @@ -1949,10 +1982,12 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(bool) **out = **in } - if in.MasterPasswordSecretRef != nil { - in, out := &in.MasterPasswordSecretRef, &out.MasterPasswordSecretRef - *out = new(v1.SecretKeySelector) - **out = **in + if in.MasterUserSecret != nil { + in, out := &in.MasterUserSecret, &out.MasterUserSecret + *out = make([]ClusterMasterUserSecretObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.MasterUserSecretKMSKeyID != nil { in, out := &in.MasterUserSecretKMSKeyID, &out.MasterUserSecretKMSKeyID @@ -1984,8 +2019,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = new(string) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region + if in.ReaderEndpoint != nil { + in, out := &in.ReaderEndpoint, &out.ReaderEndpoint *out = new(string) **out = **in } @@ -1996,28 +2031,28 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { } if in.RestoreToPointInTime != nil { in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime - *out = make([]ClusterRestoreToPointInTimeParameters, len(*in)) + *out = make([]ClusterRestoreToPointInTimeObservation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.S3Import != nil { in, out := &in.S3Import, &out.S3Import - *out = make([]ClusterS3ImportParameters, len(*in)) + *out = make([]ClusterS3ImportObservation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ScalingConfiguration != nil { in, out := &in.ScalingConfiguration, &out.ScalingConfiguration - *out = make([]ScalingConfigurationParameters, len(*in)) + *out = make([]ScalingConfigurationObservation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Serverlessv2ScalingConfiguration != nil { in, out := &in.Serverlessv2ScalingConfiguration, &out.Serverlessv2ScalingConfiguration - *out = make([]Serverlessv2ScalingConfigurationParameters, len(*in)) + *out = make([]Serverlessv2ScalingConfigurationObservation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -2055,7 +2090,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2070,7 +2106,8 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2090,149 +2127,133 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameters. -func (in *ClusterParameters) DeepCopy() *ClusterParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObservation. +func (in *ClusterObservation) DeepCopy() *ClusterObservation { if in == nil { return nil } - out := new(ClusterParameters) + out := new(ClusterObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRestoreToPointInTimeObservation) DeepCopyInto(out *ClusterRestoreToPointInTimeObservation) { +func (in *ClusterParameterGroup) DeepCopyInto(out *ClusterParameterGroup) { *out = *in - if in.RestoreToTime != nil { - in, out := &in.RestoreToTime, &out.RestoreToTime - *out = new(string) - **out = **in - } - if in.RestoreType != nil { - in, out := &in.RestoreType, &out.RestoreType - *out = new(string) - **out = **in - } - if in.SourceClusterIdentifier != nil { - in, out := &in.SourceClusterIdentifier, &out.SourceClusterIdentifier - *out = new(string) - **out = **in - } - if in.UseLatestRestorableTime != nil { - in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime - *out = new(bool) - **out = **in - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRestoreToPointInTimeObservation. -func (in *ClusterRestoreToPointInTimeObservation) DeepCopy() *ClusterRestoreToPointInTimeObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroup. +func (in *ClusterParameterGroup) DeepCopy() *ClusterParameterGroup { if in == nil { return nil } - out := new(ClusterRestoreToPointInTimeObservation) + out := new(ClusterParameterGroup) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterParameterGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRestoreToPointInTimeParameters) DeepCopyInto(out *ClusterRestoreToPointInTimeParameters) { +func (in *ClusterParameterGroupInitParameters) DeepCopyInto(out *ClusterParameterGroupInitParameters) { *out = *in - if in.RestoreToTime != nil { - in, out := &in.RestoreToTime, &out.RestoreToTime - *out = new(string) - **out = **in - } - if in.RestoreType != nil { - in, out := &in.RestoreType, &out.RestoreType + if in.Description != nil { + in, out := &in.Description, &out.Description *out = new(string) **out = **in } - if in.SourceClusterIdentifier != nil { - in, out := &in.SourceClusterIdentifier, &out.SourceClusterIdentifier + if in.Family != nil { + in, out := &in.Family, &out.Family *out = new(string) **out = **in } - if in.SourceClusterIdentifierRef != nil { - in, out := &in.SourceClusterIdentifierRef, &out.SourceClusterIdentifierRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.SourceClusterIdentifierSelector != nil { - in, out := &in.SourceClusterIdentifierSelector, &out.SourceClusterIdentifierSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ClusterParameterGroupParameterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - if in.UseLatestRestorableTime != nil { - in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime - *out = new(bool) - **out = **in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRestoreToPointInTimeParameters. -func (in *ClusterRestoreToPointInTimeParameters) DeepCopy() *ClusterRestoreToPointInTimeParameters { - if in == nil { - return nil + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - out := new(ClusterRestoreToPointInTimeParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociation) DeepCopyInto(out *ClusterRoleAssociation) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociation. -func (in *ClusterRoleAssociation) DeepCopy() *ClusterRoleAssociation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupInitParameters. +func (in *ClusterParameterGroupInitParameters) DeepCopy() *ClusterParameterGroupInitParameters { if in == nil { return nil } - out := new(ClusterRoleAssociation) + out := new(ClusterParameterGroupInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleAssociation) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociationList) DeepCopyInto(out *ClusterRoleAssociationList) { +func (in *ClusterParameterGroupList) DeepCopyInto(out *ClusterParameterGroupList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ClusterRoleAssociation, len(*in)) + *out = make([]ClusterParameterGroup, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationList. -func (in *ClusterRoleAssociationList) DeepCopy() *ClusterRoleAssociationList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupList. +func (in *ClusterParameterGroupList) DeepCopy() *ClusterParameterGroupList { if in == nil { return nil } - out := new(ClusterRoleAssociationList) + out := new(ClusterParameterGroupList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleAssociationList) DeepCopyObject() runtime.Object { +func (in *ClusterParameterGroupList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2240,266 +2261,291 @@ func (in *ClusterRoleAssociationList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociationObservation) DeepCopyInto(out *ClusterRoleAssociationObservation) { +func (in *ClusterParameterGroupObservation) DeepCopyInto(out *ClusterParameterGroupObservation) { *out = *in - if in.DBClusterIdentifier != nil { - in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + if in.Arn != nil { + in, out := &in.Arn, &out.Arn *out = new(string) **out = **in } - if in.FeatureName != nil { - in, out := &in.FeatureName, &out.FeatureName + if in.Description != nil { + in, out := &in.Description, &out.Description *out = new(string) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.Family != nil { + in, out := &in.Family, &out.Family *out = new(string) **out = **in } - if in.RoleArn != nil { - in, out := &in.RoleArn, &out.RoleArn + if in.ID != nil { + in, out := &in.ID, &out.ID *out = new(string) **out = **in } + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ClusterParameterGroupParameterObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationObservation. -func (in *ClusterRoleAssociationObservation) DeepCopy() *ClusterRoleAssociationObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupObservation. +func (in *ClusterParameterGroupObservation) DeepCopy() *ClusterParameterGroupObservation { if in == nil { return nil } - out := new(ClusterRoleAssociationObservation) + out := new(ClusterParameterGroupObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociationParameters) DeepCopyInto(out *ClusterRoleAssociationParameters) { +func (in *ClusterParameterGroupParameterInitParameters) DeepCopyInto(out *ClusterParameterGroupParameterInitParameters) { *out = *in - if in.DBClusterIdentifier != nil { - in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier - *out = new(string) - **out = **in - } - if in.FeatureName != nil { - in, out := &in.FeatureName, &out.FeatureName + if in.ApplyMethod != nil { + in, out := &in.ApplyMethod, &out.ApplyMethod *out = new(string) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region + if in.Name != nil { + in, out := &in.Name, &out.Name *out = new(string) **out = **in } - if in.RoleArn != nil { - in, out := &in.RoleArn, &out.RoleArn + if in.Value != nil { + in, out := &in.Value, &out.Value *out = new(string) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationParameters. -func (in *ClusterRoleAssociationParameters) DeepCopy() *ClusterRoleAssociationParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameterInitParameters. +func (in *ClusterParameterGroupParameterInitParameters) DeepCopy() *ClusterParameterGroupParameterInitParameters { if in == nil { return nil } - out := new(ClusterRoleAssociationParameters) + out := new(ClusterParameterGroupParameterInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociationSpec) DeepCopyInto(out *ClusterRoleAssociationSpec) { +func (in *ClusterParameterGroupParameterObservation) DeepCopyInto(out *ClusterParameterGroupParameterObservation) { *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) + if in.ApplyMethod != nil { + in, out := &in.ApplyMethod, &out.ApplyMethod + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationSpec. -func (in *ClusterRoleAssociationSpec) DeepCopy() *ClusterRoleAssociationSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameterObservation. +func (in *ClusterParameterGroupParameterObservation) DeepCopy() *ClusterParameterGroupParameterObservation { if in == nil { return nil } - out := new(ClusterRoleAssociationSpec) + out := new(ClusterParameterGroupParameterObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleAssociationStatus) DeepCopyInto(out *ClusterRoleAssociationStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationStatus. -func (in *ClusterRoleAssociationStatus) DeepCopy() *ClusterRoleAssociationStatus { - if in == nil { - return nil - } - out := new(ClusterRoleAssociationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterS3ImportObservation) DeepCopyInto(out *ClusterS3ImportObservation) { +func (in *ClusterParameterGroupParameterParameters) DeepCopyInto(out *ClusterParameterGroupParameterParameters) { *out = *in - if in.BucketName != nil { - in, out := &in.BucketName, &out.BucketName - *out = new(string) - **out = **in - } - if in.BucketPrefix != nil { - in, out := &in.BucketPrefix, &out.BucketPrefix - *out = new(string) - **out = **in - } - if in.IngestionRole != nil { - in, out := &in.IngestionRole, &out.IngestionRole + if in.ApplyMethod != nil { + in, out := &in.ApplyMethod, &out.ApplyMethod *out = new(string) **out = **in } - if in.SourceEngine != nil { - in, out := &in.SourceEngine, &out.SourceEngine + if in.Name != nil { + in, out := &in.Name, &out.Name *out = new(string) **out = **in } - if in.SourceEngineVersion != nil { - in, out := &in.SourceEngineVersion, &out.SourceEngineVersion + if in.Value != nil { + in, out := &in.Value, &out.Value *out = new(string) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterS3ImportObservation. -func (in *ClusterS3ImportObservation) DeepCopy() *ClusterS3ImportObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameterParameters. +func (in *ClusterParameterGroupParameterParameters) DeepCopy() *ClusterParameterGroupParameterParameters { if in == nil { return nil } - out := new(ClusterS3ImportObservation) + out := new(ClusterParameterGroupParameterParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterS3ImportParameters) DeepCopyInto(out *ClusterS3ImportParameters) { +func (in *ClusterParameterGroupParameters) DeepCopyInto(out *ClusterParameterGroupParameters) { *out = *in - if in.BucketName != nil { - in, out := &in.BucketName, &out.BucketName + if in.Description != nil { + in, out := &in.Description, &out.Description *out = new(string) **out = **in } - if in.BucketNameRef != nil { - in, out := &in.BucketNameRef, &out.BucketNameRef - *out = new(v1.Reference) - (*in).DeepCopyInto(*out) - } - if in.BucketNameSelector != nil { - in, out := &in.BucketNameSelector, &out.BucketNameSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.BucketPrefix != nil { - in, out := &in.BucketPrefix, &out.BucketPrefix + if in.Family != nil { + in, out := &in.Family, &out.Family *out = new(string) **out = **in } - if in.IngestionRole != nil { - in, out := &in.IngestionRole, &out.IngestionRole - *out = new(string) - **out = **in + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ClusterParameterGroupParameterParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - if in.SourceEngine != nil { - in, out := &in.SourceEngine, &out.SourceEngine + if in.Region != nil { + in, out := &in.Region, &out.Region *out = new(string) **out = **in } - if in.SourceEngineVersion != nil { - in, out := &in.SourceEngineVersion, &out.SourceEngineVersion - *out = new(string) - **out = **in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterS3ImportParameters. -func (in *ClusterS3ImportParameters) DeepCopy() *ClusterS3ImportParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupParameters. +func (in *ClusterParameterGroupParameters) DeepCopy() *ClusterParameterGroupParameters { if in == nil { return nil } - out := new(ClusterS3ImportParameters) + out := new(ClusterParameterGroupParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshot) DeepCopyInto(out *ClusterSnapshot) { +func (in *ClusterParameterGroupSpec) DeepCopyInto(out *ClusterParameterGroupSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshot. -func (in *ClusterSnapshot) DeepCopy() *ClusterSnapshot { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupSpec. +func (in *ClusterParameterGroupSpec) DeepCopy() *ClusterParameterGroupSpec { if in == nil { return nil } - out := new(ClusterSnapshot) + out := new(ClusterParameterGroupSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterSnapshot) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshotList) DeepCopyInto(out *ClusterSnapshotList) { +func (in *ClusterParameterGroupStatus) DeepCopyInto(out *ClusterParameterGroupStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterSnapshot, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotList. -func (in *ClusterSnapshotList) DeepCopy() *ClusterSnapshotList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameterGroupStatus. +func (in *ClusterParameterGroupStatus) DeepCopy() *ClusterParameterGroupStatus { if in == nil { return nil } - out := new(ClusterSnapshotList) + out := new(ClusterParameterGroupStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterSnapshotList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshotObservation) DeepCopyInto(out *ClusterSnapshotObservation) { +func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { *out = *in if in.AllocatedStorage != nil { in, out := &in.AllocatedStorage, &out.AllocatedStorage *out = new(float64) **out = **in } + if in.AllowMajorVersionUpgrade != nil { + in, out := &in.AllowMajorVersionUpgrade, &out.AllowMajorVersionUpgrade + *out = new(bool) + **out = **in + } + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } if in.AvailabilityZones != nil { in, out := &in.AvailabilityZones, &out.AvailabilityZones *out = make([]*string, len(*in)) @@ -2511,128 +2557,190 @@ func (in *ClusterSnapshotObservation) DeepCopyInto(out *ClusterSnapshotObservati } } } - if in.DBClusterIdentifier != nil { - in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier - *out = new(string) + if in.BacktrackWindow != nil { + in, out := &in.BacktrackWindow, &out.BacktrackWindow + *out = new(float64) **out = **in } - if in.DBClusterSnapshotArn != nil { - in, out := &in.DBClusterSnapshotArn, &out.DBClusterSnapshotArn - *out = new(string) + if in.BackupRetentionPeriod != nil { + in, out := &in.BackupRetentionPeriod, &out.BackupRetentionPeriod + *out = new(float64) **out = **in } - if in.DBClusterSnapshotIdentifier != nil { - in, out := &in.DBClusterSnapshotIdentifier, &out.DBClusterSnapshotIdentifier - *out = new(string) - **out = **in + if in.ClusterMembers != nil { + in, out := &in.ClusterMembers, &out.ClusterMembers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.Engine != nil { - in, out := &in.Engine, &out.Engine - *out = new(string) + if in.CopyTagsToSnapshot != nil { + in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot + *out = new(bool) **out = **in } - if in.EngineVersion != nil { - in, out := &in.EngineVersion, &out.EngineVersion + if in.DBClusterInstanceClass != nil { + in, out := &in.DBClusterInstanceClass, &out.DBClusterInstanceClass *out = new(string) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.DBClusterParameterGroupName != nil { + in, out := &in.DBClusterParameterGroupName, &out.DBClusterParameterGroupName *out = new(string) **out = **in } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID + if in.DBInstanceParameterGroupName != nil { + in, out := &in.DBInstanceParameterGroupName, &out.DBInstanceParameterGroupName *out = new(string) **out = **in } - if in.LicenseModel != nil { - in, out := &in.LicenseModel, &out.LicenseModel + if in.DBSubnetGroupName != nil { + in, out := &in.DBSubnetGroupName, &out.DBSubnetGroupName *out = new(string) **out = **in } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(float64) - **out = **in + if in.DBSubnetGroupNameRef != nil { + in, out := &in.DBSubnetGroupNameRef, &out.DBSubnetGroupNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) } - if in.SnapshotType != nil { - in, out := &in.SnapshotType, &out.SnapshotType + if in.DBSubnetGroupNameSelector != nil { + in, out := &in.DBSubnetGroupNameSelector, &out.DBSubnetGroupNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName *out = new(string) **out = **in } - if in.SourceDBClusterSnapshotArn != nil { - in, out := &in.SourceDBClusterSnapshotArn, &out.SourceDBClusterSnapshotArn - *out = new(string) + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) **out = **in } - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(string) + if in.EnableGlobalWriteForwarding != nil { + in, out := &in.EnableGlobalWriteForwarding, &out.EnableGlobalWriteForwarding + *out = new(bool) **out = **in } - if in.StorageEncrypted != nil { - in, out := &in.StorageEncrypted, &out.StorageEncrypted + if in.EnableHTTPEndpoint != nil { + in, out := &in.EnableHTTPEndpoint, &out.EnableHTTPEndpoint *out = new(bool) **out = **in } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal + if in.EnabledCloudwatchLogsExports != nil { + in, out := &in.EnabledCloudwatchLogsExports, &out.EnabledCloudwatchLogsExports + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] *out = new(string) **out = **in } - (*out)[key] = outVal } } - if in.TagsAll != nil { - in, out := &in.TagsAll, &out.TagsAll - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in } - if in.VPCID != nil { - in, out := &in.VPCID, &out.VPCID + if in.EngineMode != nil { + in, out := &in.EngineMode, &out.EngineMode *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotObservation. -func (in *ClusterSnapshotObservation) DeepCopy() *ClusterSnapshotObservation { - if in == nil { - return nil + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in } - out := new(ClusterSnapshotObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters) { - *out = *in - if in.DBClusterIdentifier != nil { - in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier *out = new(string) **out = **in } - if in.DBClusterSnapshotIdentifier != nil { - in, out := &in.DBClusterSnapshotIdentifier, &out.DBClusterSnapshotIdentifier + if in.GlobalClusterIdentifier != nil { + in, out := &in.GlobalClusterIdentifier, &out.GlobalClusterIdentifier + *out = new(string) + **out = **in + } + if in.IAMDatabaseAuthenticationEnabled != nil { + in, out := &in.IAMDatabaseAuthenticationEnabled, &out.IAMDatabaseAuthenticationEnabled + *out = new(bool) + **out = **in + } + if in.Iops != nil { + in, out := &in.Iops, &out.Iops + *out = new(float64) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.ManageMasterUserPassword != nil { + in, out := &in.ManageMasterUserPassword, &out.ManageMasterUserPassword + *out = new(bool) + **out = **in + } + if in.MasterPasswordSecretRef != nil { + in, out := &in.MasterPasswordSecretRef, &out.MasterPasswordSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.MasterUserSecretKMSKeyID != nil { + in, out := &in.MasterUserSecretKMSKeyID, &out.MasterUserSecretKMSKeyID + *out = new(string) + **out = **in + } + if in.MasterUserSecretKMSKeyIDRef != nil { + in, out := &in.MasterUserSecretKMSKeyIDRef, &out.MasterUserSecretKMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.MasterUserSecretKMSKeyIDSelector != nil { + in, out := &in.MasterUserSecretKMSKeyIDSelector, &out.MasterUserSecretKMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.MasterUsername != nil { + in, out := &in.MasterUsername, &out.MasterUsername + *out = new(string) + **out = **in + } + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PreferredBackupWindow != nil { + in, out := &in.PreferredBackupWindow, &out.PreferredBackupWindow + *out = new(string) + **out = **in + } + if in.PreferredMaintenanceWindow != nil { + in, out := &in.PreferredMaintenanceWindow, &out.PreferredMaintenanceWindow *out = new(string) **out = **in } @@ -2641,6 +2749,64 @@ func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters *out = new(string) **out = **in } + if in.ReplicationSourceIdentifier != nil { + in, out := &in.ReplicationSourceIdentifier, &out.ReplicationSourceIdentifier + *out = new(string) + **out = **in + } + if in.RestoreToPointInTime != nil { + in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime + *out = make([]ClusterRestoreToPointInTimeParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.S3Import != nil { + in, out := &in.S3Import, &out.S3Import + *out = make([]ClusterS3ImportParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ScalingConfiguration != nil { + in, out := &in.ScalingConfiguration, &out.ScalingConfiguration + *out = make([]ScalingConfigurationParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Serverlessv2ScalingConfiguration != nil { + in, out := &in.Serverlessv2ScalingConfiguration, &out.Serverlessv2ScalingConfiguration + *out = make([]Serverlessv2ScalingConfigurationParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SkipFinalSnapshot != nil { + in, out := &in.SkipFinalSnapshot, &out.SkipFinalSnapshot + *out = new(bool) + **out = **in + } + if in.SnapshotIdentifier != nil { + in, out := &in.SnapshotIdentifier, &out.SnapshotIdentifier + *out = new(string) + **out = **in + } + if in.SourceRegion != nil { + in, out := &in.SourceRegion, &out.SourceRegion + *out = new(string) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in + } + if in.StorageType != nil { + in, out := &in.StorageType, &out.StorageType + *out = new(string) + **out = **in + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -2649,7 +2815,8 @@ func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -2664,238 +2831,1687 @@ func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotParameters. -func (in *ClusterSnapshotParameters) DeepCopy() *ClusterSnapshotParameters { - if in == nil { - return nil + if in.VPCSecurityGroupIDRefs != nil { + in, out := &in.VPCSecurityGroupIDRefs, &out.VPCSecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPCSecurityGroupIDSelector != nil { + in, out := &in.VPCSecurityGroupIDSelector, &out.VPCSecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.VPCSecurityGroupIds != nil { + in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - out := new(ClusterSnapshotParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshotSpec) DeepCopyInto(out *ClusterSnapshotSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotSpec. -func (in *ClusterSnapshotSpec) DeepCopy() *ClusterSnapshotSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterParameters. +func (in *ClusterParameters) DeepCopy() *ClusterParameters { if in == nil { return nil } - out := new(ClusterSnapshotSpec) + out := new(ClusterParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSnapshotStatus) DeepCopyInto(out *ClusterSnapshotStatus) { +func (in *ClusterRestoreToPointInTimeInitParameters) DeepCopyInto(out *ClusterRestoreToPointInTimeInitParameters) { *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) + if in.RestoreToTime != nil { + in, out := &in.RestoreToTime, &out.RestoreToTime + *out = new(string) + **out = **in + } + if in.RestoreType != nil { + in, out := &in.RestoreType, &out.RestoreType + *out = new(string) + **out = **in + } + if in.UseLatestRestorableTime != nil { + in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime + *out = new(bool) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotStatus. -func (in *ClusterSnapshotStatus) DeepCopy() *ClusterSnapshotStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRestoreToPointInTimeInitParameters. +func (in *ClusterRestoreToPointInTimeInitParameters) DeepCopy() *ClusterRestoreToPointInTimeInitParameters { if in == nil { return nil } - out := new(ClusterSnapshotStatus) + out := new(ClusterRestoreToPointInTimeInitParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { +func (in *ClusterRestoreToPointInTimeObservation) DeepCopyInto(out *ClusterRestoreToPointInTimeObservation) { *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. -func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in.RestoreToTime != nil { + in, out := &in.RestoreToTime, &out.RestoreToTime + *out = new(string) + **out = **in + } + if in.RestoreType != nil { + in, out := &in.RestoreType, &out.RestoreType + *out = new(string) + **out = **in + } + if in.SourceClusterIdentifier != nil { + in, out := &in.SourceClusterIdentifier, &out.SourceClusterIdentifier + *out = new(string) + **out = **in + } + if in.UseLatestRestorableTime != nil { + in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRestoreToPointInTimeObservation. +func (in *ClusterRestoreToPointInTimeObservation) DeepCopy() *ClusterRestoreToPointInTimeObservation { if in == nil { return nil } - out := new(ClusterSpec) + out := new(ClusterRestoreToPointInTimeObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { +func (in *ClusterRestoreToPointInTimeParameters) DeepCopyInto(out *ClusterRestoreToPointInTimeParameters) { + *out = *in + if in.RestoreToTime != nil { + in, out := &in.RestoreToTime, &out.RestoreToTime + *out = new(string) + **out = **in + } + if in.RestoreType != nil { + in, out := &in.RestoreType, &out.RestoreType + *out = new(string) + **out = **in + } + if in.SourceClusterIdentifier != nil { + in, out := &in.SourceClusterIdentifier, &out.SourceClusterIdentifier + *out = new(string) + **out = **in + } + if in.SourceClusterIdentifierRef != nil { + in, out := &in.SourceClusterIdentifierRef, &out.SourceClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SourceClusterIdentifierSelector != nil { + in, out := &in.SourceClusterIdentifierSelector, &out.SourceClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.UseLatestRestorableTime != nil { + in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRestoreToPointInTimeParameters. +func (in *ClusterRestoreToPointInTimeParameters) DeepCopy() *ClusterRestoreToPointInTimeParameters { + if in == nil { + return nil + } + out := new(ClusterRestoreToPointInTimeParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociation) DeepCopyInto(out *ClusterRoleAssociation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociation. +func (in *ClusterRoleAssociation) DeepCopy() *ClusterRoleAssociation { + if in == nil { + return nil + } + out := new(ClusterRoleAssociation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleAssociation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationInitParameters) DeepCopyInto(out *ClusterRoleAssociationInitParameters) { + *out = *in + if in.FeatureName != nil { + in, out := &in.FeatureName, &out.FeatureName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationInitParameters. +func (in *ClusterRoleAssociationInitParameters) DeepCopy() *ClusterRoleAssociationInitParameters { + if in == nil { + return nil + } + out := new(ClusterRoleAssociationInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationList) DeepCopyInto(out *ClusterRoleAssociationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleAssociation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationList. +func (in *ClusterRoleAssociationList) DeepCopy() *ClusterRoleAssociationList { + if in == nil { + return nil + } + out := new(ClusterRoleAssociationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterRoleAssociationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationObservation) DeepCopyInto(out *ClusterRoleAssociationObservation) { + *out = *in + if in.DBClusterIdentifier != nil { + in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + *out = new(string) + **out = **in + } + if in.FeatureName != nil { + in, out := &in.FeatureName, &out.FeatureName + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.RoleArn != nil { + in, out := &in.RoleArn, &out.RoleArn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationObservation. +func (in *ClusterRoleAssociationObservation) DeepCopy() *ClusterRoleAssociationObservation { + if in == nil { + return nil + } + out := new(ClusterRoleAssociationObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationParameters) DeepCopyInto(out *ClusterRoleAssociationParameters) { + *out = *in + if in.DBClusterIdentifier != nil { + in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + *out = new(string) + **out = **in + } + if in.DBClusterIdentifierRef != nil { + in, out := &in.DBClusterIdentifierRef, &out.DBClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBClusterIdentifierSelector != nil { + in, out := &in.DBClusterIdentifierSelector, &out.DBClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.FeatureName != nil { + in, out := &in.FeatureName, &out.FeatureName + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RoleArn != nil { + in, out := &in.RoleArn, &out.RoleArn + *out = new(string) + **out = **in + } + if in.RoleArnRef != nil { + in, out := &in.RoleArnRef, &out.RoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RoleArnSelector != nil { + in, out := &in.RoleArnSelector, &out.RoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationParameters. +func (in *ClusterRoleAssociationParameters) DeepCopy() *ClusterRoleAssociationParameters { + if in == nil { + return nil + } + out := new(ClusterRoleAssociationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationSpec) DeepCopyInto(out *ClusterRoleAssociationSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationSpec. +func (in *ClusterRoleAssociationSpec) DeepCopy() *ClusterRoleAssociationSpec { + if in == nil { + return nil + } + out := new(ClusterRoleAssociationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterRoleAssociationStatus) DeepCopyInto(out *ClusterRoleAssociationStatus) { *out = *in in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. -func (in *ClusterStatus) DeepCopy() *ClusterStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleAssociationStatus. +func (in *ClusterRoleAssociationStatus) DeepCopy() *ClusterRoleAssociationStatus { if in == nil { return nil } - out := new(ClusterStatus) + out := new(ClusterRoleAssociationStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConnectionPoolConfigObservation) DeepCopyInto(out *ConnectionPoolConfigObservation) { +func (in *ClusterS3ImportInitParameters) DeepCopyInto(out *ClusterS3ImportInitParameters) { + *out = *in + if in.BucketName != nil { + in, out := &in.BucketName, &out.BucketName + *out = new(string) + **out = **in + } + if in.BucketPrefix != nil { + in, out := &in.BucketPrefix, &out.BucketPrefix + *out = new(string) + **out = **in + } + if in.IngestionRole != nil { + in, out := &in.IngestionRole, &out.IngestionRole + *out = new(string) + **out = **in + } + if in.SourceEngine != nil { + in, out := &in.SourceEngine, &out.SourceEngine + *out = new(string) + **out = **in + } + if in.SourceEngineVersion != nil { + in, out := &in.SourceEngineVersion, &out.SourceEngineVersion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterS3ImportInitParameters. +func (in *ClusterS3ImportInitParameters) DeepCopy() *ClusterS3ImportInitParameters { + if in == nil { + return nil + } + out := new(ClusterS3ImportInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterS3ImportObservation) DeepCopyInto(out *ClusterS3ImportObservation) { + *out = *in + if in.BucketName != nil { + in, out := &in.BucketName, &out.BucketName + *out = new(string) + **out = **in + } + if in.BucketPrefix != nil { + in, out := &in.BucketPrefix, &out.BucketPrefix + *out = new(string) + **out = **in + } + if in.IngestionRole != nil { + in, out := &in.IngestionRole, &out.IngestionRole + *out = new(string) + **out = **in + } + if in.SourceEngine != nil { + in, out := &in.SourceEngine, &out.SourceEngine + *out = new(string) + **out = **in + } + if in.SourceEngineVersion != nil { + in, out := &in.SourceEngineVersion, &out.SourceEngineVersion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterS3ImportObservation. +func (in *ClusterS3ImportObservation) DeepCopy() *ClusterS3ImportObservation { + if in == nil { + return nil + } + out := new(ClusterS3ImportObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterS3ImportParameters) DeepCopyInto(out *ClusterS3ImportParameters) { + *out = *in + if in.BucketName != nil { + in, out := &in.BucketName, &out.BucketName + *out = new(string) + **out = **in + } + if in.BucketPrefix != nil { + in, out := &in.BucketPrefix, &out.BucketPrefix + *out = new(string) + **out = **in + } + if in.IngestionRole != nil { + in, out := &in.IngestionRole, &out.IngestionRole + *out = new(string) + **out = **in + } + if in.SourceEngine != nil { + in, out := &in.SourceEngine, &out.SourceEngine + *out = new(string) + **out = **in + } + if in.SourceEngineVersion != nil { + in, out := &in.SourceEngineVersion, &out.SourceEngineVersion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterS3ImportParameters. +func (in *ClusterS3ImportParameters) DeepCopy() *ClusterS3ImportParameters { + if in == nil { + return nil + } + out := new(ClusterS3ImportParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshot) DeepCopyInto(out *ClusterSnapshot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshot. +func (in *ClusterSnapshot) DeepCopy() *ClusterSnapshot { + if in == nil { + return nil + } + out := new(ClusterSnapshot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterSnapshot) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotInitParameters) DeepCopyInto(out *ClusterSnapshotInitParameters) { + *out = *in + if in.DBClusterSnapshotIdentifier != nil { + in, out := &in.DBClusterSnapshotIdentifier, &out.DBClusterSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotInitParameters. +func (in *ClusterSnapshotInitParameters) DeepCopy() *ClusterSnapshotInitParameters { + if in == nil { + return nil + } + out := new(ClusterSnapshotInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotList) DeepCopyInto(out *ClusterSnapshotList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterSnapshot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotList. +func (in *ClusterSnapshotList) DeepCopy() *ClusterSnapshotList { + if in == nil { + return nil + } + out := new(ClusterSnapshotList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterSnapshotList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotObservation) DeepCopyInto(out *ClusterSnapshotObservation) { + *out = *in + if in.AllocatedStorage != nil { + in, out := &in.AllocatedStorage, &out.AllocatedStorage + *out = new(float64) + **out = **in + } + if in.AvailabilityZones != nil { + in, out := &in.AvailabilityZones, &out.AvailabilityZones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.DBClusterIdentifier != nil { + in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + *out = new(string) + **out = **in + } + if in.DBClusterSnapshotArn != nil { + in, out := &in.DBClusterSnapshotArn, &out.DBClusterSnapshotArn + *out = new(string) + **out = **in + } + if in.DBClusterSnapshotIdentifier != nil { + in, out := &in.DBClusterSnapshotIdentifier, &out.DBClusterSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.LicenseModel != nil { + in, out := &in.LicenseModel, &out.LicenseModel + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.SnapshotType != nil { + in, out := &in.SnapshotType, &out.SnapshotType + *out = new(string) + **out = **in + } + if in.SourceDBClusterSnapshotArn != nil { + in, out := &in.SourceDBClusterSnapshotArn, &out.SourceDBClusterSnapshotArn + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotObservation. +func (in *ClusterSnapshotObservation) DeepCopy() *ClusterSnapshotObservation { + if in == nil { + return nil + } + out := new(ClusterSnapshotObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotParameters) DeepCopyInto(out *ClusterSnapshotParameters) { + *out = *in + if in.DBClusterIdentifier != nil { + in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + *out = new(string) + **out = **in + } + if in.DBClusterIdentifierRef != nil { + in, out := &in.DBClusterIdentifierRef, &out.DBClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBClusterIdentifierSelector != nil { + in, out := &in.DBClusterIdentifierSelector, &out.DBClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.DBClusterSnapshotIdentifier != nil { + in, out := &in.DBClusterSnapshotIdentifier, &out.DBClusterSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotParameters. +func (in *ClusterSnapshotParameters) DeepCopy() *ClusterSnapshotParameters { + if in == nil { + return nil + } + out := new(ClusterSnapshotParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotSpec) DeepCopyInto(out *ClusterSnapshotSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotSpec. +func (in *ClusterSnapshotSpec) DeepCopy() *ClusterSnapshotSpec { + if in == nil { + return nil + } + out := new(ClusterSnapshotSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotStatus) DeepCopyInto(out *ClusterSnapshotStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotStatus. +func (in *ClusterSnapshotStatus) DeepCopy() *ClusterSnapshotStatus { + if in == nil { + return nil + } + out := new(ClusterSnapshotStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectionPoolConfigInitParameters) DeepCopyInto(out *ConnectionPoolConfigInitParameters) { + *out = *in + if in.ConnectionBorrowTimeout != nil { + in, out := &in.ConnectionBorrowTimeout, &out.ConnectionBorrowTimeout + *out = new(float64) + **out = **in + } + if in.InitQuery != nil { + in, out := &in.InitQuery, &out.InitQuery + *out = new(string) + **out = **in + } + if in.MaxConnectionsPercent != nil { + in, out := &in.MaxConnectionsPercent, &out.MaxConnectionsPercent + *out = new(float64) + **out = **in + } + if in.MaxIdleConnectionsPercent != nil { + in, out := &in.MaxIdleConnectionsPercent, &out.MaxIdleConnectionsPercent + *out = new(float64) + **out = **in + } + if in.SessionPinningFilters != nil { + in, out := &in.SessionPinningFilters, &out.SessionPinningFilters + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolConfigInitParameters. +func (in *ConnectionPoolConfigInitParameters) DeepCopy() *ConnectionPoolConfigInitParameters { + if in == nil { + return nil + } + out := new(ConnectionPoolConfigInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectionPoolConfigObservation) DeepCopyInto(out *ConnectionPoolConfigObservation) { + *out = *in + if in.ConnectionBorrowTimeout != nil { + in, out := &in.ConnectionBorrowTimeout, &out.ConnectionBorrowTimeout + *out = new(float64) + **out = **in + } + if in.InitQuery != nil { + in, out := &in.InitQuery, &out.InitQuery + *out = new(string) + **out = **in + } + if in.MaxConnectionsPercent != nil { + in, out := &in.MaxConnectionsPercent, &out.MaxConnectionsPercent + *out = new(float64) + **out = **in + } + if in.MaxIdleConnectionsPercent != nil { + in, out := &in.MaxIdleConnectionsPercent, &out.MaxIdleConnectionsPercent + *out = new(float64) + **out = **in + } + if in.SessionPinningFilters != nil { + in, out := &in.SessionPinningFilters, &out.SessionPinningFilters + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolConfigObservation. +func (in *ConnectionPoolConfigObservation) DeepCopy() *ConnectionPoolConfigObservation { + if in == nil { + return nil + } + out := new(ConnectionPoolConfigObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectionPoolConfigParameters) DeepCopyInto(out *ConnectionPoolConfigParameters) { *out = *in if in.ConnectionBorrowTimeout != nil { in, out := &in.ConnectionBorrowTimeout, &out.ConnectionBorrowTimeout *out = new(float64) **out = **in } - if in.InitQuery != nil { - in, out := &in.InitQuery, &out.InitQuery + if in.InitQuery != nil { + in, out := &in.InitQuery, &out.InitQuery + *out = new(string) + **out = **in + } + if in.MaxConnectionsPercent != nil { + in, out := &in.MaxConnectionsPercent, &out.MaxConnectionsPercent + *out = new(float64) + **out = **in + } + if in.MaxIdleConnectionsPercent != nil { + in, out := &in.MaxIdleConnectionsPercent, &out.MaxIdleConnectionsPercent + *out = new(float64) + **out = **in + } + if in.SessionPinningFilters != nil { + in, out := &in.SessionPinningFilters, &out.SessionPinningFilters + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolConfigParameters. +func (in *ConnectionPoolConfigParameters) DeepCopy() *ConnectionPoolConfigParameters { + if in == nil { + return nil + } + out := new(ConnectionPoolConfigParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplication) DeepCopyInto(out *DBInstanceAutomatedBackupsReplication) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplication. +func (in *DBInstanceAutomatedBackupsReplication) DeepCopy() *DBInstanceAutomatedBackupsReplication { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DBInstanceAutomatedBackupsReplication) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationInitParameters) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationInitParameters) { + *out = *in + if in.PreSignedURL != nil { + in, out := &in.PreSignedURL, &out.PreSignedURL + *out = new(string) + **out = **in + } + if in.RetentionPeriod != nil { + in, out := &in.RetentionPeriod, &out.RetentionPeriod + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationInitParameters. +func (in *DBInstanceAutomatedBackupsReplicationInitParameters) DeepCopy() *DBInstanceAutomatedBackupsReplicationInitParameters { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DBInstanceAutomatedBackupsReplication, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationList. +func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopy() *DBInstanceAutomatedBackupsReplicationList { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationObservation) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.PreSignedURL != nil { + in, out := &in.PreSignedURL, &out.PreSignedURL + *out = new(string) + **out = **in + } + if in.RetentionPeriod != nil { + in, out := &in.RetentionPeriod, &out.RetentionPeriod + *out = new(float64) + **out = **in + } + if in.SourceDBInstanceArn != nil { + in, out := &in.SourceDBInstanceArn, &out.SourceDBInstanceArn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationObservation. +func (in *DBInstanceAutomatedBackupsReplicationObservation) DeepCopy() *DBInstanceAutomatedBackupsReplicationObservation { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationParameters) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationParameters) { + *out = *in + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.PreSignedURL != nil { + in, out := &in.PreSignedURL, &out.PreSignedURL + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RetentionPeriod != nil { + in, out := &in.RetentionPeriod, &out.RetentionPeriod + *out = new(float64) + **out = **in + } + if in.SourceDBInstanceArn != nil { + in, out := &in.SourceDBInstanceArn, &out.SourceDBInstanceArn + *out = new(string) + **out = **in + } + if in.SourceDBInstanceArnRef != nil { + in, out := &in.SourceDBInstanceArnRef, &out.SourceDBInstanceArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SourceDBInstanceArnSelector != nil { + in, out := &in.SourceDBInstanceArnSelector, &out.SourceDBInstanceArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationParameters. +func (in *DBInstanceAutomatedBackupsReplicationParameters) DeepCopy() *DBInstanceAutomatedBackupsReplicationParameters { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationSpec) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationSpec. +func (in *DBInstanceAutomatedBackupsReplicationSpec) DeepCopy() *DBInstanceAutomatedBackupsReplicationSpec { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBInstanceAutomatedBackupsReplicationStatus) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationStatus. +func (in *DBInstanceAutomatedBackupsReplicationStatus) DeepCopy() *DBInstanceAutomatedBackupsReplicationStatus { + if in == nil { + return nil + } + out := new(DBInstanceAutomatedBackupsReplicationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBSnapshotCopy) DeepCopyInto(out *DBSnapshotCopy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopy. +func (in *DBSnapshotCopy) DeepCopy() *DBSnapshotCopy { + if in == nil { + return nil + } + out := new(DBSnapshotCopy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DBSnapshotCopy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBSnapshotCopyInitParameters) DeepCopyInto(out *DBSnapshotCopyInitParameters) { + *out = *in + if in.CopyTags != nil { + in, out := &in.CopyTags, &out.CopyTags + *out = new(bool) + **out = **in + } + if in.DestinationRegion != nil { + in, out := &in.DestinationRegion, &out.DestinationRegion + *out = new(string) + **out = **in + } + if in.OptionGroupName != nil { + in, out := &in.OptionGroupName, &out.OptionGroupName + *out = new(string) + **out = **in + } + if in.PresignedURL != nil { + in, out := &in.PresignedURL, &out.PresignedURL + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TargetCustomAvailabilityZone != nil { + in, out := &in.TargetCustomAvailabilityZone, &out.TargetCustomAvailabilityZone + *out = new(string) + **out = **in + } + if in.TargetDBSnapshotIdentifier != nil { + in, out := &in.TargetDBSnapshotIdentifier, &out.TargetDBSnapshotIdentifier + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyInitParameters. +func (in *DBSnapshotCopyInitParameters) DeepCopy() *DBSnapshotCopyInitParameters { + if in == nil { + return nil + } + out := new(DBSnapshotCopyInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBSnapshotCopyList) DeepCopyInto(out *DBSnapshotCopyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DBSnapshotCopy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyList. +func (in *DBSnapshotCopyList) DeepCopy() *DBSnapshotCopyList { + if in == nil { + return nil + } + out := new(DBSnapshotCopyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DBSnapshotCopyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBSnapshotCopyObservation) DeepCopyInto(out *DBSnapshotCopyObservation) { + *out = *in + if in.AllocatedStorage != nil { + in, out := &in.AllocatedStorage, &out.AllocatedStorage + *out = new(float64) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.CopyTags != nil { + in, out := &in.CopyTags, &out.CopyTags + *out = new(bool) + **out = **in + } + if in.DBSnapshotArn != nil { + in, out := &in.DBSnapshotArn, &out.DBSnapshotArn + *out = new(string) + **out = **in + } + if in.DestinationRegion != nil { + in, out := &in.DestinationRegion, &out.DestinationRegion + *out = new(string) + **out = **in + } + if in.Encrypted != nil { + in, out := &in.Encrypted, &out.Encrypted + *out = new(bool) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Iops != nil { + in, out := &in.Iops, &out.Iops + *out = new(float64) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.LicenseModel != nil { + in, out := &in.LicenseModel, &out.LicenseModel + *out = new(string) + **out = **in + } + if in.OptionGroupName != nil { + in, out := &in.OptionGroupName, &out.OptionGroupName + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PresignedURL != nil { + in, out := &in.PresignedURL, &out.PresignedURL + *out = new(string) + **out = **in + } + if in.SnapshotType != nil { + in, out := &in.SnapshotType, &out.SnapshotType + *out = new(string) + **out = **in + } + if in.SourceDBSnapshotIdentifier != nil { + in, out := &in.SourceDBSnapshotIdentifier, &out.SourceDBSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.SourceRegion != nil { + in, out := &in.SourceRegion, &out.SourceRegion + *out = new(string) + **out = **in + } + if in.StorageType != nil { + in, out := &in.StorageType, &out.StorageType + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TargetCustomAvailabilityZone != nil { + in, out := &in.TargetCustomAvailabilityZone, &out.TargetCustomAvailabilityZone + *out = new(string) + **out = **in + } + if in.TargetDBSnapshotIdentifier != nil { + in, out := &in.TargetDBSnapshotIdentifier, &out.TargetDBSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyObservation. +func (in *DBSnapshotCopyObservation) DeepCopy() *DBSnapshotCopyObservation { + if in == nil { + return nil + } + out := new(DBSnapshotCopyObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DBSnapshotCopyParameters) DeepCopyInto(out *DBSnapshotCopyParameters) { + *out = *in + if in.CopyTags != nil { + in, out := &in.CopyTags, &out.CopyTags + *out = new(bool) + **out = **in + } + if in.DestinationRegion != nil { + in, out := &in.DestinationRegion, &out.DestinationRegion + *out = new(string) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.OptionGroupName != nil { + in, out := &in.OptionGroupName, &out.OptionGroupName + *out = new(string) + **out = **in + } + if in.PresignedURL != nil { + in, out := &in.PresignedURL, &out.PresignedURL + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region *out = new(string) **out = **in } - if in.MaxConnectionsPercent != nil { - in, out := &in.MaxConnectionsPercent, &out.MaxConnectionsPercent - *out = new(float64) + if in.SourceDBSnapshotIdentifier != nil { + in, out := &in.SourceDBSnapshotIdentifier, &out.SourceDBSnapshotIdentifier + *out = new(string) **out = **in } - if in.MaxIdleConnectionsPercent != nil { - in, out := &in.MaxIdleConnectionsPercent, &out.MaxIdleConnectionsPercent - *out = new(float64) - **out = **in + if in.SourceDBSnapshotIdentifierRef != nil { + in, out := &in.SourceDBSnapshotIdentifierRef, &out.SourceDBSnapshotIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) } - if in.SessionPinningFilters != nil { - in, out := &in.SessionPinningFilters, &out.SessionPinningFilters - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] + if in.SourceDBSnapshotIdentifierSelector != nil { + in, out := &in.SourceDBSnapshotIdentifierSelector, &out.SourceDBSnapshotIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } + (*out)[key] = outVal } } + if in.TargetCustomAvailabilityZone != nil { + in, out := &in.TargetCustomAvailabilityZone, &out.TargetCustomAvailabilityZone + *out = new(string) + **out = **in + } + if in.TargetDBSnapshotIdentifier != nil { + in, out := &in.TargetDBSnapshotIdentifier, &out.TargetDBSnapshotIdentifier + *out = new(string) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolConfigObservation. -func (in *ConnectionPoolConfigObservation) DeepCopy() *ConnectionPoolConfigObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyParameters. +func (in *DBSnapshotCopyParameters) DeepCopy() *DBSnapshotCopyParameters { if in == nil { return nil } - out := new(ConnectionPoolConfigObservation) + out := new(DBSnapshotCopyParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConnectionPoolConfigParameters) DeepCopyInto(out *ConnectionPoolConfigParameters) { +func (in *DBSnapshotCopySpec) DeepCopyInto(out *DBSnapshotCopySpec) { *out = *in - if in.ConnectionBorrowTimeout != nil { - in, out := &in.ConnectionBorrowTimeout, &out.ConnectionBorrowTimeout - *out = new(float64) - **out = **in - } - if in.InitQuery != nil { - in, out := &in.InitQuery, &out.InitQuery - *out = new(string) - **out = **in - } - if in.MaxConnectionsPercent != nil { - in, out := &in.MaxConnectionsPercent, &out.MaxConnectionsPercent - *out = new(float64) - **out = **in - } - if in.MaxIdleConnectionsPercent != nil { - in, out := &in.MaxIdleConnectionsPercent, &out.MaxIdleConnectionsPercent - *out = new(float64) - **out = **in - } - if in.SessionPinningFilters != nil { - in, out := &in.SessionPinningFilters, &out.SessionPinningFilters - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolConfigParameters. -func (in *ConnectionPoolConfigParameters) DeepCopy() *ConnectionPoolConfigParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopySpec. +func (in *DBSnapshotCopySpec) DeepCopy() *DBSnapshotCopySpec { if in == nil { return nil } - out := new(ConnectionPoolConfigParameters) + out := new(DBSnapshotCopySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplication) DeepCopyInto(out *DBInstanceAutomatedBackupsReplication) { +func (in *DBSnapshotCopyStatus) DeepCopyInto(out *DBSnapshotCopyStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplication. -func (in *DBInstanceAutomatedBackupsReplication) DeepCopy() *DBInstanceAutomatedBackupsReplication { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyStatus. +func (in *DBSnapshotCopyStatus) DeepCopy() *DBSnapshotCopyStatus { if in == nil { return nil } - out := new(DBInstanceAutomatedBackupsReplication) + out := new(DBSnapshotCopyStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DBInstanceAutomatedBackupsReplication) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationList) { +func (in *EventSubscription) DeepCopyInto(out *EventSubscription) { *out = *in out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DBInstanceAutomatedBackupsReplication, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationList. -func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopy() *DBInstanceAutomatedBackupsReplicationList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscription. +func (in *EventSubscription) DeepCopy() *EventSubscription { if in == nil { return nil } - out := new(DBInstanceAutomatedBackupsReplicationList) + out := new(EventSubscription) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopyObject() runtime.Object { +func (in *EventSubscription) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2903,172 +4519,110 @@ func (in *DBInstanceAutomatedBackupsReplicationList) DeepCopyObject() runtime.Ob } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplicationObservation) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationObservation) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID - *out = new(string) - **out = **in - } - if in.PreSignedURL != nil { - in, out := &in.PreSignedURL, &out.PreSignedURL - *out = new(string) - **out = **in - } - if in.RetentionPeriod != nil { - in, out := &in.RetentionPeriod, &out.RetentionPeriod - *out = new(float64) - **out = **in - } - if in.SourceDBInstanceArn != nil { - in, out := &in.SourceDBInstanceArn, &out.SourceDBInstanceArn - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationObservation. -func (in *DBInstanceAutomatedBackupsReplicationObservation) DeepCopy() *DBInstanceAutomatedBackupsReplicationObservation { - if in == nil { - return nil - } - out := new(DBInstanceAutomatedBackupsReplicationObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplicationParameters) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationParameters) { +func (in *EventSubscriptionInitParameters) DeepCopyInto(out *EventSubscriptionInitParameters) { *out = *in - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID - *out = new(string) - **out = **in - } - if in.PreSignedURL != nil { - in, out := &in.PreSignedURL, &out.PreSignedURL - *out = new(string) + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region - *out = new(string) - **out = **in + if in.EventCategories != nil { + in, out := &in.EventCategories, &out.EventCategories + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.RetentionPeriod != nil { - in, out := &in.RetentionPeriod, &out.RetentionPeriod - *out = new(float64) - **out = **in + if in.SourceIds != nil { + in, out := &in.SourceIds, &out.SourceIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.SourceDBInstanceArn != nil { - in, out := &in.SourceDBInstanceArn, &out.SourceDBInstanceArn + if in.SourceType != nil { + in, out := &in.SourceType, &out.SourceType *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationParameters. -func (in *DBInstanceAutomatedBackupsReplicationParameters) DeepCopy() *DBInstanceAutomatedBackupsReplicationParameters { - if in == nil { - return nil - } - out := new(DBInstanceAutomatedBackupsReplicationParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplicationSpec) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationSpec. -func (in *DBInstanceAutomatedBackupsReplicationSpec) DeepCopy() *DBInstanceAutomatedBackupsReplicationSpec { - if in == nil { - return nil + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - out := new(DBInstanceAutomatedBackupsReplicationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBInstanceAutomatedBackupsReplicationStatus) DeepCopyInto(out *DBInstanceAutomatedBackupsReplicationStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceAutomatedBackupsReplicationStatus. -func (in *DBInstanceAutomatedBackupsReplicationStatus) DeepCopy() *DBInstanceAutomatedBackupsReplicationStatus { - if in == nil { - return nil + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } } - out := new(DBInstanceAutomatedBackupsReplicationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopy) DeepCopyInto(out *DBSnapshotCopy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopy. -func (in *DBSnapshotCopy) DeepCopy() *DBSnapshotCopy { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionInitParameters. +func (in *EventSubscriptionInitParameters) DeepCopy() *EventSubscriptionInitParameters { if in == nil { return nil } - out := new(DBSnapshotCopy) + out := new(EventSubscriptionInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DBSnapshotCopy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopyList) DeepCopyInto(out *DBSnapshotCopyList) { +func (in *EventSubscriptionList) DeepCopyInto(out *EventSubscriptionList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DBSnapshotCopy, len(*in)) + *out = make([]EventSubscription, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyList. -func (in *DBSnapshotCopyList) DeepCopy() *DBSnapshotCopyList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionList. +func (in *EventSubscriptionList) DeepCopy() *EventSubscriptionList { if in == nil { return nil } - out := new(DBSnapshotCopyList) + out := new(EventSubscriptionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DBSnapshotCopyList) DeepCopyObject() runtime.Object { +func (in *EventSubscriptionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3076,100 +4630,57 @@ func (in *DBSnapshotCopyList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopyObservation) DeepCopyInto(out *DBSnapshotCopyObservation) { +func (in *EventSubscriptionObservation) DeepCopyInto(out *EventSubscriptionObservation) { *out = *in - if in.AllocatedStorage != nil { - in, out := &in.AllocatedStorage, &out.AllocatedStorage - *out = new(float64) - **out = **in - } - if in.AvailabilityZone != nil { - in, out := &in.AvailabilityZone, &out.AvailabilityZone - *out = new(string) - **out = **in - } - if in.CopyTags != nil { - in, out := &in.CopyTags, &out.CopyTags - *out = new(bool) - **out = **in - } - if in.DBSnapshotArn != nil { - in, out := &in.DBSnapshotArn, &out.DBSnapshotArn + if in.Arn != nil { + in, out := &in.Arn, &out.Arn *out = new(string) **out = **in } - if in.DestinationRegion != nil { - in, out := &in.DestinationRegion, &out.DestinationRegion + if in.CustomerAwsID != nil { + in, out := &in.CustomerAwsID, &out.CustomerAwsID *out = new(string) **out = **in } - if in.Encrypted != nil { - in, out := &in.Encrypted, &out.Encrypted + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled *out = new(bool) **out = **in } - if in.Engine != nil { - in, out := &in.Engine, &out.Engine - *out = new(string) - **out = **in - } - if in.EngineVersion != nil { - in, out := &in.EngineVersion, &out.EngineVersion - *out = new(string) - **out = **in + if in.EventCategories != nil { + in, out := &in.EventCategories, &out.EventCategories + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) **out = **in } - if in.Iops != nil { - in, out := &in.Iops, &out.Iops - *out = new(float64) - **out = **in - } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID - *out = new(string) - **out = **in - } - if in.LicenseModel != nil { - in, out := &in.LicenseModel, &out.LicenseModel - *out = new(string) - **out = **in - } - if in.OptionGroupName != nil { - in, out := &in.OptionGroupName, &out.OptionGroupName - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(float64) - **out = **in - } - if in.PresignedURL != nil { - in, out := &in.PresignedURL, &out.PresignedURL - *out = new(string) - **out = **in - } - if in.SnapshotType != nil { - in, out := &in.SnapshotType, &out.SnapshotType - *out = new(string) - **out = **in - } - if in.SourceDBSnapshotIdentifier != nil { - in, out := &in.SourceDBSnapshotIdentifier, &out.SourceDBSnapshotIdentifier + if in.SnsTopic != nil { + in, out := &in.SnsTopic, &out.SnsTopic *out = new(string) **out = **in } - if in.SourceRegion != nil { - in, out := &in.SourceRegion, &out.SourceRegion - *out = new(string) - **out = **in + if in.SourceIds != nil { + in, out := &in.SourceIds, &out.SourceIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.StorageType != nil { - in, out := &in.StorageType, &out.StorageType + if in.SourceType != nil { + in, out := &in.SourceType, &out.SourceType *out = new(string) **out = **in } @@ -3181,7 +4692,8 @@ func (in *DBSnapshotCopyObservation) DeepCopyInto(out *DBSnapshotCopyObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -3196,75 +4708,78 @@ func (in *DBSnapshotCopyObservation) DeepCopyInto(out *DBSnapshotCopyObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } - if in.TargetCustomAvailabilityZone != nil { - in, out := &in.TargetCustomAvailabilityZone, &out.TargetCustomAvailabilityZone - *out = new(string) - **out = **in - } - if in.TargetDBSnapshotIdentifier != nil { - in, out := &in.TargetDBSnapshotIdentifier, &out.TargetDBSnapshotIdentifier - *out = new(string) - **out = **in - } - if in.VPCID != nil { - in, out := &in.VPCID, &out.VPCID - *out = new(string) - **out = **in - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyObservation. -func (in *DBSnapshotCopyObservation) DeepCopy() *DBSnapshotCopyObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionObservation. +func (in *EventSubscriptionObservation) DeepCopy() *EventSubscriptionObservation { if in == nil { return nil } - out := new(DBSnapshotCopyObservation) + out := new(EventSubscriptionObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopyParameters) DeepCopyInto(out *DBSnapshotCopyParameters) { +func (in *EventSubscriptionParameters) DeepCopyInto(out *EventSubscriptionParameters) { *out = *in - if in.CopyTags != nil { - in, out := &in.CopyTags, &out.CopyTags + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled *out = new(bool) **out = **in } - if in.DestinationRegion != nil { - in, out := &in.DestinationRegion, &out.DestinationRegion - *out = new(string) - **out = **in + if in.EventCategories != nil { + in, out := &in.EventCategories, &out.EventCategories + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } } - if in.KMSKeyID != nil { - in, out := &in.KMSKeyID, &out.KMSKeyID + if in.Region != nil { + in, out := &in.Region, &out.Region *out = new(string) **out = **in } - if in.OptionGroupName != nil { - in, out := &in.OptionGroupName, &out.OptionGroupName + if in.SnsTopic != nil { + in, out := &in.SnsTopic, &out.SnsTopic *out = new(string) **out = **in } - if in.PresignedURL != nil { - in, out := &in.PresignedURL, &out.PresignedURL - *out = new(string) - **out = **in + if in.SnsTopicRef != nil { + in, out := &in.SnsTopicRef, &out.SnsTopicRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) } - if in.Region != nil { - in, out := &in.Region, &out.Region - *out = new(string) - **out = **in + if in.SnsTopicSelector != nil { + in, out := &in.SnsTopicSelector, &out.SnsTopicSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) } - if in.SourceDBSnapshotIdentifier != nil { - in, out := &in.SourceDBSnapshotIdentifier, &out.SourceDBSnapshotIdentifier + if in.SourceIds != nil { + in, out := &in.SourceIds, &out.SourceIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.SourceType != nil { + in, out := &in.SourceType, &out.SourceType *out = new(string) **out = **in } @@ -3276,7 +4791,8 @@ func (in *DBSnapshotCopyParameters) DeepCopyInto(out *DBSnapshotCopyParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -3291,71 +4807,63 @@ func (in *DBSnapshotCopyParameters) DeepCopyInto(out *DBSnapshotCopyParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } - if in.TargetCustomAvailabilityZone != nil { - in, out := &in.TargetCustomAvailabilityZone, &out.TargetCustomAvailabilityZone - *out = new(string) - **out = **in - } - if in.TargetDBSnapshotIdentifier != nil { - in, out := &in.TargetDBSnapshotIdentifier, &out.TargetDBSnapshotIdentifier - *out = new(string) - **out = **in - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyParameters. -func (in *DBSnapshotCopyParameters) DeepCopy() *DBSnapshotCopyParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionParameters. +func (in *EventSubscriptionParameters) DeepCopy() *EventSubscriptionParameters { if in == nil { return nil } - out := new(DBSnapshotCopyParameters) + out := new(EventSubscriptionParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopySpec) DeepCopyInto(out *DBSnapshotCopySpec) { +func (in *EventSubscriptionSpec) DeepCopyInto(out *EventSubscriptionSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopySpec. -func (in *DBSnapshotCopySpec) DeepCopy() *DBSnapshotCopySpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionSpec. +func (in *EventSubscriptionSpec) DeepCopy() *EventSubscriptionSpec { if in == nil { return nil } - out := new(DBSnapshotCopySpec) + out := new(EventSubscriptionSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DBSnapshotCopyStatus) DeepCopyInto(out *DBSnapshotCopyStatus) { +func (in *EventSubscriptionStatus) DeepCopyInto(out *EventSubscriptionStatus) { *out = *in in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSnapshotCopyStatus. -func (in *DBSnapshotCopyStatus) DeepCopy() *DBSnapshotCopyStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionStatus. +func (in *EventSubscriptionStatus) DeepCopy() *EventSubscriptionStatus { if in == nil { return nil } - out := new(DBSnapshotCopyStatus) + out := new(EventSubscriptionStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscription) DeepCopyInto(out *EventSubscription) { +func (in *GlobalCluster) DeepCopyInto(out *GlobalCluster) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -3363,18 +4871,18 @@ func (in *EventSubscription) DeepCopyInto(out *EventSubscription) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscription. -func (in *EventSubscription) DeepCopy() *EventSubscription { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCluster. +func (in *GlobalCluster) DeepCopy() *GlobalCluster { if in == nil { return nil } - out := new(EventSubscription) + out := new(GlobalCluster) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EventSubscription) DeepCopyObject() runtime.Object { +func (in *GlobalCluster) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3382,31 +4890,76 @@ func (in *EventSubscription) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscriptionList) DeepCopyInto(out *EventSubscriptionList) { +func (in *GlobalClusterInitParameters) DeepCopyInto(out *GlobalClusterInitParameters) { + *out = *in + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName + *out = new(string) + **out = **in + } + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) + **out = **in + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion + *out = new(string) + **out = **in + } + if in.ForceDestroy != nil { + in, out := &in.ForceDestroy, &out.ForceDestroy + *out = new(bool) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterInitParameters. +func (in *GlobalClusterInitParameters) DeepCopy() *GlobalClusterInitParameters { + if in == nil { + return nil + } + out := new(GlobalClusterInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterList) DeepCopyInto(out *GlobalClusterList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]EventSubscription, len(*in)) + *out = make([]GlobalCluster, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionList. -func (in *EventSubscriptionList) DeepCopy() *EventSubscriptionList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterList. +func (in *GlobalClusterList) DeepCopy() *GlobalClusterList { if in == nil { return nil } - out := new(EventSubscriptionList) + out := new(GlobalClusterList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EventSubscriptionList) DeepCopyObject() runtime.Object { +func (in *GlobalClusterList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3414,225 +4967,239 @@ func (in *EventSubscriptionList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscriptionObservation) DeepCopyInto(out *EventSubscriptionObservation) { +func (in *GlobalClusterMembersInitParameters) DeepCopyInto(out *GlobalClusterMembersInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersInitParameters. +func (in *GlobalClusterMembersInitParameters) DeepCopy() *GlobalClusterMembersInitParameters { + if in == nil { + return nil + } + out := new(GlobalClusterMembersInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterMembersObservation) DeepCopyInto(out *GlobalClusterMembersObservation) { + *out = *in + if in.DBClusterArn != nil { + in, out := &in.DBClusterArn, &out.DBClusterArn + *out = new(string) + **out = **in + } + if in.IsWriter != nil { + in, out := &in.IsWriter, &out.IsWriter + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersObservation. +func (in *GlobalClusterMembersObservation) DeepCopy() *GlobalClusterMembersObservation { + if in == nil { + return nil + } + out := new(GlobalClusterMembersObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterMembersParameters) DeepCopyInto(out *GlobalClusterMembersParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersParameters. +func (in *GlobalClusterMembersParameters) DeepCopy() *GlobalClusterMembersParameters { + if in == nil { + return nil + } + out := new(GlobalClusterMembersParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalClusterObservation) DeepCopyInto(out *GlobalClusterObservation) { *out = *in if in.Arn != nil { in, out := &in.Arn, &out.Arn *out = new(string) **out = **in } - if in.CustomerAwsID != nil { - in, out := &in.CustomerAwsID, &out.CustomerAwsID + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName *out = new(string) **out = **in } - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection *out = new(bool) **out = **in } - if in.EventCategories != nil { - in, out := &in.EventCategories, &out.EventCategories - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) **out = **in } - if in.SnsTopic != nil { - in, out := &in.SnsTopic, &out.SnsTopic + if in.EngineVersionActual != nil { + in, out := &in.EngineVersionActual, &out.EngineVersionActual *out = new(string) **out = **in } - if in.SourceIds != nil { - in, out := &in.SourceIds, &out.SourceIds - *out = make([]*string, len(*in)) + if in.ForceDestroy != nil { + in, out := &in.ForceDestroy, &out.ForceDestroy + *out = new(bool) + **out = **in + } + if in.GlobalClusterMembers != nil { + in, out := &in.GlobalClusterMembers, &out.GlobalClusterMembers + *out = make([]GlobalClusterMembersObservation, len(*in)) for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } + (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.SourceType != nil { - in, out := &in.SourceType, &out.SourceType + if in.GlobalClusterResourceID != nil { + in, out := &in.GlobalClusterResourceID, &out.GlobalClusterResourceID *out = new(string) **out = **in } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in } - if in.TagsAll != nil { - in, out := &in.TagsAll, &out.TagsAll - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.SourceDBClusterIdentifier != nil { + in, out := &in.SourceDBClusterIdentifier, &out.SourceDBClusterIdentifier + *out = new(string) + **out = **in + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionObservation. -func (in *EventSubscriptionObservation) DeepCopy() *EventSubscriptionObservation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterObservation. +func (in *GlobalClusterObservation) DeepCopy() *GlobalClusterObservation { if in == nil { return nil } - out := new(EventSubscriptionObservation) + out := new(GlobalClusterObservation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscriptionParameters) DeepCopyInto(out *EventSubscriptionParameters) { +func (in *GlobalClusterParameters) DeepCopyInto(out *GlobalClusterParameters) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled + if in.DatabaseName != nil { + in, out := &in.DatabaseName, &out.DatabaseName + *out = new(string) + **out = **in + } + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection *out = new(bool) **out = **in } - if in.EventCategories != nil { - in, out := &in.EventCategories, &out.EventCategories - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } - if in.Region != nil { - in, out := &in.Region, &out.Region + if in.Engine != nil { + in, out := &in.Engine, &out.Engine *out = new(string) **out = **in } - if in.SnsTopic != nil { - in, out := &in.SnsTopic, &out.SnsTopic + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) **out = **in } - if in.SourceIds != nil { - in, out := &in.SourceIds, &out.SourceIds - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } + if in.ForceDestroy != nil { + in, out := &in.ForceDestroy, &out.ForceDestroy + *out = new(bool) + **out = **in } - if in.SourceType != nil { - in, out := &in.SourceType, &out.SourceType + if in.Region != nil { + in, out := &in.Region, &out.Region *out = new(string) **out = **in } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.SourceDBClusterIdentifier != nil { + in, out := &in.SourceDBClusterIdentifier, &out.SourceDBClusterIdentifier + *out = new(string) + **out = **in } - if in.TagsAll != nil { - in, out := &in.TagsAll, &out.TagsAll - *out = make(map[string]*string, len(*in)) - for key, val := range *in { - var outVal *string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(string) - **out = **in - } - (*out)[key] = outVal - } + if in.SourceDBClusterIdentifierRef != nil { + in, out := &in.SourceDBClusterIdentifierRef, &out.SourceDBClusterIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SourceDBClusterIdentifierSelector != nil { + in, out := &in.SourceDBClusterIdentifierSelector, &out.SourceDBClusterIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.StorageEncrypted != nil { + in, out := &in.StorageEncrypted, &out.StorageEncrypted + *out = new(bool) + **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionParameters. -func (in *EventSubscriptionParameters) DeepCopy() *EventSubscriptionParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterParameters. +func (in *GlobalClusterParameters) DeepCopy() *GlobalClusterParameters { if in == nil { return nil } - out := new(EventSubscriptionParameters) + out := new(GlobalClusterParameters) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscriptionSpec) DeepCopyInto(out *EventSubscriptionSpec) { +func (in *GlobalClusterSpec) DeepCopyInto(out *GlobalClusterSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionSpec. -func (in *EventSubscriptionSpec) DeepCopy() *EventSubscriptionSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterSpec. +func (in *GlobalClusterSpec) DeepCopy() *GlobalClusterSpec { if in == nil { return nil } - out := new(EventSubscriptionSpec) + out := new(GlobalClusterSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSubscriptionStatus) DeepCopyInto(out *EventSubscriptionStatus) { +func (in *GlobalClusterStatus) DeepCopyInto(out *GlobalClusterStatus) { *out = *in in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSubscriptionStatus. -func (in *EventSubscriptionStatus) DeepCopy() *EventSubscriptionStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterStatus. +func (in *GlobalClusterStatus) DeepCopy() *GlobalClusterStatus { if in == nil { return nil } - out := new(EventSubscriptionStatus) + out := new(GlobalClusterStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalCluster) DeepCopyInto(out *GlobalCluster) { +func (in *Instance) DeepCopyInto(out *Instance) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -3640,18 +5207,18 @@ func (in *GlobalCluster) DeepCopyInto(out *GlobalCluster) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCluster. -func (in *GlobalCluster) DeepCopy() *GlobalCluster { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance. +func (in *Instance) DeepCopy() *Instance { if in == nil { return nil } - out := new(GlobalCluster) + out := new(Instance) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalCluster) DeepCopyObject() runtime.Object { +func (in *Instance) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3659,189 +5226,242 @@ func (in *GlobalCluster) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterList) DeepCopyInto(out *GlobalClusterList) { +func (in *InstanceInitParameters) DeepCopyInto(out *InstanceInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GlobalCluster, len(*in)) + if in.AllocatedStorage != nil { + in, out := &in.AllocatedStorage, &out.AllocatedStorage + *out = new(float64) + **out = **in + } + if in.AllowMajorVersionUpgrade != nil { + in, out := &in.AllowMajorVersionUpgrade, &out.AllowMajorVersionUpgrade + *out = new(bool) + **out = **in + } + if in.ApplyImmediately != nil { + in, out := &in.ApplyImmediately, &out.ApplyImmediately + *out = new(bool) + **out = **in + } + if in.AutoMinorVersionUpgrade != nil { + in, out := &in.AutoMinorVersionUpgrade, &out.AutoMinorVersionUpgrade + *out = new(bool) + **out = **in + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.BackupRetentionPeriod != nil { + in, out := &in.BackupRetentionPeriod, &out.BackupRetentionPeriod + *out = new(float64) + **out = **in + } + if in.BackupWindow != nil { + in, out := &in.BackupWindow, &out.BackupWindow + *out = new(string) + **out = **in + } + if in.BlueGreenUpdate != nil { + in, out := &in.BlueGreenUpdate, &out.BlueGreenUpdate + *out = make([]BlueGreenUpdateInitParameters, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterList. -func (in *GlobalClusterList) DeepCopy() *GlobalClusterList { - if in == nil { - return nil + if in.CACertIdentifier != nil { + in, out := &in.CACertIdentifier, &out.CACertIdentifier + *out = new(string) + **out = **in } - out := new(GlobalClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalClusterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.CharacterSetName != nil { + in, out := &in.CharacterSetName, &out.CharacterSetName + *out = new(string) + **out = **in } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterMembersObservation) DeepCopyInto(out *GlobalClusterMembersObservation) { - *out = *in - if in.DBClusterArn != nil { - in, out := &in.DBClusterArn, &out.DBClusterArn + if in.CopyTagsToSnapshot != nil { + in, out := &in.CopyTagsToSnapshot, &out.CopyTagsToSnapshot + *out = new(bool) + **out = **in + } + if in.CustomIAMInstanceProfile != nil { + in, out := &in.CustomIAMInstanceProfile, &out.CustomIAMInstanceProfile *out = new(string) **out = **in } - if in.IsWriter != nil { - in, out := &in.IsWriter, &out.IsWriter + if in.CustomerOwnedIPEnabled != nil { + in, out := &in.CustomerOwnedIPEnabled, &out.CustomerOwnedIPEnabled *out = new(bool) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersObservation. -func (in *GlobalClusterMembersObservation) DeepCopy() *GlobalClusterMembersObservation { - if in == nil { - return nil + if in.DBName != nil { + in, out := &in.DBName, &out.DBName + *out = new(string) + **out = **in } - out := new(GlobalClusterMembersObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterMembersParameters) DeepCopyInto(out *GlobalClusterMembersParameters) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterMembersParameters. -func (in *GlobalClusterMembersParameters) DeepCopy() *GlobalClusterMembersParameters { - if in == nil { - return nil + if in.DeleteAutomatedBackups != nil { + in, out := &in.DeleteAutomatedBackups, &out.DeleteAutomatedBackups + *out = new(bool) + **out = **in } - out := new(GlobalClusterMembersParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterObservation) DeepCopyInto(out *GlobalClusterObservation) { - *out = *in - if in.Arn != nil { - in, out := &in.Arn, &out.Arn + if in.DeletionProtection != nil { + in, out := &in.DeletionProtection, &out.DeletionProtection + *out = new(bool) + **out = **in + } + if in.Domain != nil { + in, out := &in.Domain, &out.Domain + *out = new(string) + **out = **in + } + if in.DomainIAMRoleName != nil { + in, out := &in.DomainIAMRoleName, &out.DomainIAMRoleName + *out = new(string) + **out = **in + } + if in.EnabledCloudwatchLogsExports != nil { + in, out := &in.EnabledCloudwatchLogsExports, &out.EnabledCloudwatchLogsExports + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine *out = new(string) **out = **in } - if in.DatabaseName != nil { - in, out := &in.DatabaseName, &out.DatabaseName + if in.EngineVersion != nil { + in, out := &in.EngineVersion, &out.EngineVersion *out = new(string) **out = **in } - if in.DeletionProtection != nil { - in, out := &in.DeletionProtection, &out.DeletionProtection + if in.FinalSnapshotIdentifier != nil { + in, out := &in.FinalSnapshotIdentifier, &out.FinalSnapshotIdentifier + *out = new(string) + **out = **in + } + if in.IAMDatabaseAuthenticationEnabled != nil { + in, out := &in.IAMDatabaseAuthenticationEnabled, &out.IAMDatabaseAuthenticationEnabled *out = new(bool) **out = **in } - if in.Engine != nil { - in, out := &in.Engine, &out.Engine + if in.InstanceClass != nil { + in, out := &in.InstanceClass, &out.InstanceClass *out = new(string) **out = **in } - if in.EngineVersion != nil { - in, out := &in.EngineVersion, &out.EngineVersion + if in.Iops != nil { + in, out := &in.Iops, &out.Iops + *out = new(float64) + **out = **in + } + if in.LicenseModel != nil { + in, out := &in.LicenseModel, &out.LicenseModel *out = new(string) **out = **in } - if in.EngineVersionActual != nil { - in, out := &in.EngineVersionActual, &out.EngineVersionActual + if in.MaintenanceWindow != nil { + in, out := &in.MaintenanceWindow, &out.MaintenanceWindow *out = new(string) **out = **in } - if in.ForceDestroy != nil { - in, out := &in.ForceDestroy, &out.ForceDestroy + if in.ManageMasterUserPassword != nil { + in, out := &in.ManageMasterUserPassword, &out.ManageMasterUserPassword *out = new(bool) **out = **in } - if in.GlobalClusterMembers != nil { - in, out := &in.GlobalClusterMembers, &out.GlobalClusterMembers - *out = make([]GlobalClusterMembersObservation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.MaxAllocatedStorage != nil { + in, out := &in.MaxAllocatedStorage, &out.MaxAllocatedStorage + *out = new(float64) + **out = **in } - if in.GlobalClusterResourceID != nil { - in, out := &in.GlobalClusterResourceID, &out.GlobalClusterResourceID - *out = new(string) + if in.MonitoringInterval != nil { + in, out := &in.MonitoringInterval, &out.MonitoringInterval + *out = new(float64) **out = **in } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) + if in.MultiAz != nil { + in, out := &in.MultiAz, &out.MultiAz + *out = new(bool) **out = **in } - if in.SourceDBClusterIdentifier != nil { - in, out := &in.SourceDBClusterIdentifier, &out.SourceDBClusterIdentifier + if in.NcharCharacterSetName != nil { + in, out := &in.NcharCharacterSetName, &out.NcharCharacterSetName *out = new(string) **out = **in } - if in.StorageEncrypted != nil { - in, out := &in.StorageEncrypted, &out.StorageEncrypted - *out = new(bool) + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterObservation. -func (in *GlobalClusterObservation) DeepCopy() *GlobalClusterObservation { - if in == nil { - return nil + if in.OptionGroupName != nil { + in, out := &in.OptionGroupName, &out.OptionGroupName + *out = new(string) + **out = **in } - out := new(GlobalClusterObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterParameters) DeepCopyInto(out *GlobalClusterParameters) { - *out = *in - if in.DatabaseName != nil { - in, out := &in.DatabaseName, &out.DatabaseName + if in.ParameterGroupName != nil { + in, out := &in.ParameterGroupName, &out.ParameterGroupName *out = new(string) **out = **in } - if in.DeletionProtection != nil { - in, out := &in.DeletionProtection, &out.DeletionProtection + if in.PerformanceInsightsEnabled != nil { + in, out := &in.PerformanceInsightsEnabled, &out.PerformanceInsightsEnabled *out = new(bool) **out = **in } - if in.Engine != nil { - in, out := &in.Engine, &out.Engine + if in.PerformanceInsightsKMSKeyID != nil { + in, out := &in.PerformanceInsightsKMSKeyID, &out.PerformanceInsightsKMSKeyID *out = new(string) **out = **in } - if in.EngineVersion != nil { - in, out := &in.EngineVersion, &out.EngineVersion - *out = new(string) + if in.PerformanceInsightsRetentionPeriod != nil { + in, out := &in.PerformanceInsightsRetentionPeriod, &out.PerformanceInsightsRetentionPeriod + *out = new(float64) **out = **in } - if in.ForceDestroy != nil { - in, out := &in.ForceDestroy, &out.ForceDestroy + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.PubliclyAccessible != nil { + in, out := &in.PubliclyAccessible, &out.PubliclyAccessible *out = new(bool) **out = **in } - if in.Region != nil { - in, out := &in.Region, &out.Region + if in.ReplicaMode != nil { + in, out := &in.ReplicaMode, &out.ReplicaMode *out = new(string) **out = **in } - if in.SourceDBClusterIdentifier != nil { - in, out := &in.SourceDBClusterIdentifier, &out.SourceDBClusterIdentifier + if in.RestoreToPointInTime != nil { + in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime + *out = make([]RestoreToPointInTimeInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.S3Import != nil { + in, out := &in.S3Import, &out.S3Import + *out = make([]S3ImportInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SkipFinalSnapshot != nil { + in, out := &in.SkipFinalSnapshot, &out.SkipFinalSnapshot + *out = new(bool) + **out = **in + } + if in.SnapshotIdentifier != nil { + in, out := &in.SnapshotIdentifier, &out.SnapshotIdentifier *out = new(string) **out = **in } @@ -3850,79 +5470,70 @@ func (in *GlobalClusterParameters) DeepCopyInto(out *GlobalClusterParameters) { *out = new(bool) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterParameters. -func (in *GlobalClusterParameters) DeepCopy() *GlobalClusterParameters { - if in == nil { - return nil + if in.StorageThroughput != nil { + in, out := &in.StorageThroughput, &out.StorageThroughput + *out = new(float64) + **out = **in } - out := new(GlobalClusterParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterSpec) DeepCopyInto(out *GlobalClusterSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterSpec. -func (in *GlobalClusterSpec) DeepCopy() *GlobalClusterSpec { - if in == nil { - return nil + if in.StorageType != nil { + in, out := &in.StorageType, &out.StorageType + *out = new(string) + **out = **in } - out := new(GlobalClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalClusterStatus) DeepCopyInto(out *GlobalClusterStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalClusterStatus. -func (in *GlobalClusterStatus) DeepCopy() *GlobalClusterStatus { - if in == nil { - return nil + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Timezone != nil { + in, out := &in.Timezone, &out.Timezone + *out = new(string) + **out = **in + } + if in.Username != nil { + in, out := &in.Username, &out.Username + *out = new(string) + **out = **in } - out := new(GlobalClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Instance) DeepCopyInto(out *Instance) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance. -func (in *Instance) DeepCopy() *Instance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceInitParameters. +func (in *InstanceInitParameters) DeepCopy() *InstanceInitParameters { if in == nil { return nil } - out := new(Instance) + out := new(InstanceInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Instance) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InstanceList) DeepCopyInto(out *InstanceList) { *out = *in @@ -4313,7 +5924,8 @@ func (in *InstanceObservation) DeepCopyInto(out *InstanceObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -4328,7 +5940,8 @@ func (in *InstanceObservation) DeepCopyInto(out *InstanceObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -4559,6 +6172,16 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { *out = new(string) **out = **in } + if in.MasterUserSecretKMSKeyIDRef != nil { + in, out := &in.MasterUserSecretKMSKeyIDRef, &out.MasterUserSecretKMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.MasterUserSecretKMSKeyIDSelector != nil { + in, out := &in.MasterUserSecretKMSKeyIDSelector, &out.MasterUserSecretKMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.MaxAllocatedStorage != nil { in, out := &in.MaxAllocatedStorage, &out.MaxAllocatedStorage *out = new(float64) @@ -4574,6 +6197,16 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { *out = new(string) **out = **in } + if in.MonitoringRoleArnRef != nil { + in, out := &in.MonitoringRoleArnRef, &out.MonitoringRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.MonitoringRoleArnSelector != nil { + in, out := &in.MonitoringRoleArnSelector, &out.MonitoringRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.MultiAz != nil { in, out := &in.MultiAz, &out.MultiAz *out = new(bool) @@ -4644,6 +6277,16 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { *out = new(string) **out = **in } + if in.ReplicateSourceDBRef != nil { + in, out := &in.ReplicateSourceDBRef, &out.ReplicateSourceDBRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ReplicateSourceDBSelector != nil { + in, out := &in.ReplicateSourceDBSelector, &out.ReplicateSourceDBSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.RestoreToPointInTime != nil { in, out := &in.RestoreToPointInTime, &out.RestoreToPointInTime *out = make([]RestoreToPointInTimeParameters, len(*in)) @@ -4691,7 +6334,8 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -4706,7 +6350,8 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -4723,6 +6368,18 @@ func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { *out = new(string) **out = **in } + if in.VPCSecurityGroupIDRefs != nil { + in, out := &in.VPCSecurityGroupIDRefs, &out.VPCSecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPCSecurityGroupIDSelector != nil { + in, out := &in.VPCSecurityGroupIDSelector, &out.VPCSecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.VPCSecurityGroupIds != nil { in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds *out = make([]*string, len(*in)) @@ -4773,6 +6430,26 @@ func (in *InstanceRoleAssociation) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceRoleAssociationInitParameters) DeepCopyInto(out *InstanceRoleAssociationInitParameters) { + *out = *in + if in.FeatureName != nil { + in, out := &in.FeatureName, &out.FeatureName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceRoleAssociationInitParameters. +func (in *InstanceRoleAssociationInitParameters) DeepCopy() *InstanceRoleAssociationInitParameters { + if in == nil { + return nil + } + out := new(InstanceRoleAssociationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InstanceRoleAssociationList) DeepCopyInto(out *InstanceRoleAssociationList) { *out = *in @@ -4848,6 +6525,16 @@ func (in *InstanceRoleAssociationParameters) DeepCopyInto(out *InstanceRoleAssoc *out = new(string) **out = **in } + if in.DBInstanceIdentifierRef != nil { + in, out := &in.DBInstanceIdentifierRef, &out.DBInstanceIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBInstanceIdentifierSelector != nil { + in, out := &in.DBInstanceIdentifierSelector, &out.DBInstanceIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.FeatureName != nil { in, out := &in.FeatureName, &out.FeatureName *out = new(string) @@ -4863,6 +6550,16 @@ func (in *InstanceRoleAssociationParameters) DeepCopyInto(out *InstanceRoleAssoc *out = new(string) **out = **in } + if in.RoleArnRef != nil { + in, out := &in.RoleArnRef, &out.RoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RoleArnSelector != nil { + in, out := &in.RoleArnSelector, &out.RoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceRoleAssociationParameters. @@ -4880,6 +6577,7 @@ func (in *InstanceRoleAssociationSpec) DeepCopyInto(out *InstanceRoleAssociation *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceRoleAssociationSpec. @@ -4914,6 +6612,7 @@ func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceSpec. @@ -4943,6 +6642,21 @@ func (in *InstanceStatus) DeepCopy() *InstanceStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ListenerEndpointInitParameters) DeepCopyInto(out *ListenerEndpointInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerEndpointInitParameters. +func (in *ListenerEndpointInitParameters) DeepCopy() *ListenerEndpointInitParameters { + if in == nil { + return nil + } + out := new(ListenerEndpointInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ListenerEndpointObservation) DeepCopyInto(out *ListenerEndpointObservation) { *out = *in @@ -4988,6 +6702,21 @@ func (in *ListenerEndpointParameters) DeepCopy() *ListenerEndpointParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MasterUserSecretInitParameters) DeepCopyInto(out *MasterUserSecretInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterUserSecretInitParameters. +func (in *MasterUserSecretInitParameters) DeepCopy() *MasterUserSecretInitParameters { + if in == nil { + return nil + } + out := new(MasterUserSecretInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MasterUserSecretObservation) DeepCopyInto(out *MasterUserSecretObservation) { *out = *in @@ -5060,6 +6789,75 @@ func (in *OptionGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OptionGroupInitParameters) DeepCopyInto(out *OptionGroupInitParameters) { + *out = *in + if in.EngineName != nil { + in, out := &in.EngineName, &out.EngineName + *out = new(string) + **out = **in + } + if in.MajorEngineVersion != nil { + in, out := &in.MajorEngineVersion, &out.MajorEngineVersion + *out = new(string) + **out = **in + } + if in.Option != nil { + in, out := &in.Option, &out.Option + *out = make([]OptionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OptionGroupDescription != nil { + in, out := &in.OptionGroupDescription, &out.OptionGroupDescription + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionGroupInitParameters. +func (in *OptionGroupInitParameters) DeepCopy() *OptionGroupInitParameters { + if in == nil { + return nil + } + out := new(OptionGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OptionGroupList) DeepCopyInto(out *OptionGroupList) { *out = *in @@ -5135,7 +6933,8 @@ func (in *OptionGroupObservation) DeepCopyInto(out *OptionGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5150,7 +6949,8 @@ func (in *OptionGroupObservation) DeepCopyInto(out *OptionGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5207,7 +7007,8 @@ func (in *OptionGroupParameters) DeepCopyInto(out *OptionGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5222,7 +7023,8 @@ func (in *OptionGroupParameters) DeepCopyInto(out *OptionGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5246,6 +7048,7 @@ func (in *OptionGroupSpec) DeepCopyInto(out *OptionGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionGroupSpec. @@ -5275,6 +7078,65 @@ func (in *OptionGroupStatus) DeepCopy() *OptionGroupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OptionInitParameters) DeepCopyInto(out *OptionInitParameters) { + *out = *in + if in.DBSecurityGroupMemberships != nil { + in, out := &in.DBSecurityGroupMemberships, &out.DBSecurityGroupMemberships + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.OptionName != nil { + in, out := &in.OptionName, &out.OptionName + *out = new(string) + **out = **in + } + if in.OptionSettings != nil { + in, out := &in.OptionSettings, &out.OptionSettings + *out = make([]OptionSettingsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.VPCSecurityGroupMemberships != nil { + in, out := &in.VPCSecurityGroupMemberships, &out.VPCSecurityGroupMemberships + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionInitParameters. +func (in *OptionInitParameters) DeepCopy() *OptionInitParameters { + if in == nil { + return nil + } + out := new(OptionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OptionObservation) DeepCopyInto(out *OptionObservation) { *out = *in @@ -5393,6 +7255,31 @@ func (in *OptionParameters) DeepCopy() *OptionParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OptionSettingsInitParameters) DeepCopyInto(out *OptionSettingsInitParameters) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionSettingsInitParameters. +func (in *OptionSettingsInitParameters) DeepCopy() *OptionSettingsInitParameters { + if in == nil { + return nil + } + out := new(OptionSettingsInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OptionSettingsObservation) DeepCopyInto(out *OptionSettingsObservation) { *out = *in @@ -5452,24 +7339,88 @@ func (in *ParameterGroup) DeepCopyInto(out *ParameterGroup) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroup. -func (in *ParameterGroup) DeepCopy() *ParameterGroup { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroup. +func (in *ParameterGroup) DeepCopy() *ParameterGroup { + if in == nil { + return nil + } + out := new(ParameterGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ParameterGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterGroupInitParameters) DeepCopyInto(out *ParameterGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Family != nil { + in, out := &in.Family, &out.Family + *out = new(string) + **out = **in + } + if in.Parameter != nil { + in, out := &in.Parameter, &out.Parameter + *out = make([]ParameterInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupInitParameters. +func (in *ParameterGroupInitParameters) DeepCopy() *ParameterGroupInitParameters { if in == nil { return nil } - out := new(ParameterGroup) + out := new(ParameterGroupInitParameters) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ParameterGroup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterGroupList) DeepCopyInto(out *ParameterGroupList) { *out = *in @@ -5540,7 +7491,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5555,7 +7507,8 @@ func (in *ParameterGroupObservation) DeepCopyInto(out *ParameterGroupObservation if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5607,7 +7560,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5622,7 +7576,8 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -5646,6 +7601,7 @@ func (in *ParameterGroupSpec) DeepCopyInto(out *ParameterGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterGroupSpec. @@ -5675,6 +7631,36 @@ func (in *ParameterGroupStatus) DeepCopy() *ParameterGroupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterInitParameters) DeepCopyInto(out *ParameterInitParameters) { + *out = *in + if in.ApplyMethod != nil { + in, out := &in.ApplyMethod, &out.ApplyMethod + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterInitParameters. +func (in *ParameterInitParameters) DeepCopy() *ParameterInitParameters { + if in == nil { + return nil + } + out := new(ParameterInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterObservation) DeepCopyInto(out *ParameterObservation) { *out = *in @@ -5789,6 +7775,28 @@ func (in *ProxyDefaultTargetGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyDefaultTargetGroupInitParameters) DeepCopyInto(out *ProxyDefaultTargetGroupInitParameters) { + *out = *in + if in.ConnectionPoolConfig != nil { + in, out := &in.ConnectionPoolConfig, &out.ConnectionPoolConfig + *out = make([]ConnectionPoolConfigInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyDefaultTargetGroupInitParameters. +func (in *ProxyDefaultTargetGroupInitParameters) DeepCopy() *ProxyDefaultTargetGroupInitParameters { + if in == nil { + return nil + } + out := new(ProxyDefaultTargetGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyDefaultTargetGroupList) DeepCopyInto(out *ProxyDefaultTargetGroupList) { *out = *in @@ -5878,6 +7886,16 @@ func (in *ProxyDefaultTargetGroupParameters) DeepCopyInto(out *ProxyDefaultTarge *out = new(string) **out = **in } + if in.DBProxyNameRef != nil { + in, out := &in.DBProxyNameRef, &out.DBProxyNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBProxyNameSelector != nil { + in, out := &in.DBProxyNameSelector, &out.DBProxyNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -5900,6 +7918,7 @@ func (in *ProxyDefaultTargetGroupSpec) DeepCopyInto(out *ProxyDefaultTargetGroup *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyDefaultTargetGroupSpec. @@ -5956,6 +7975,69 @@ func (in *ProxyEndpoint) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyEndpointInitParameters) DeepCopyInto(out *ProxyEndpointInitParameters) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TargetRole != nil { + in, out := &in.TargetRole, &out.TargetRole + *out = new(string) + **out = **in + } + if in.VPCSubnetIds != nil { + in, out := &in.VPCSubnetIds, &out.VPCSubnetIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyEndpointInitParameters. +func (in *ProxyEndpointInitParameters) DeepCopy() *ProxyEndpointInitParameters { + if in == nil { + return nil + } + out := new(ProxyEndpointInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyEndpointList) DeepCopyInto(out *ProxyEndpointList) { *out = *in @@ -6024,7 +8106,8 @@ func (in *ProxyEndpointObservation) DeepCopyInto(out *ProxyEndpointObservation) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6039,7 +8122,8 @@ func (in *ProxyEndpointObservation) DeepCopyInto(out *ProxyEndpointObservation) if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6098,6 +8182,16 @@ func (in *ProxyEndpointParameters) DeepCopyInto(out *ProxyEndpointParameters) { *out = new(string) **out = **in } + if in.DBProxyNameRef != nil { + in, out := &in.DBProxyNameRef, &out.DBProxyNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBProxyNameSelector != nil { + in, out := &in.DBProxyNameSelector, &out.DBProxyNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -6111,7 +8205,8 @@ func (in *ProxyEndpointParameters) DeepCopyInto(out *ProxyEndpointParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6126,7 +8221,8 @@ func (in *ProxyEndpointParameters) DeepCopyInto(out *ProxyEndpointParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6138,6 +8234,18 @@ func (in *ProxyEndpointParameters) DeepCopyInto(out *ProxyEndpointParameters) { *out = new(string) **out = **in } + if in.VPCSecurityGroupIDRefs != nil { + in, out := &in.VPCSecurityGroupIDRefs, &out.VPCSecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPCSecurityGroupIDSelector != nil { + in, out := &in.VPCSecurityGroupIDSelector, &out.VPCSecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.VPCSecurityGroupIds != nil { in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds *out = make([]*string, len(*in)) @@ -6177,6 +8285,7 @@ func (in *ProxyEndpointSpec) DeepCopyInto(out *ProxyEndpointSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyEndpointSpec. @@ -6206,6 +8315,91 @@ func (in *ProxyEndpointStatus) DeepCopy() *ProxyEndpointStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyInitParameters) DeepCopyInto(out *ProxyInitParameters) { + *out = *in + if in.Auth != nil { + in, out := &in.Auth, &out.Auth + *out = make([]AuthInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DebugLogging != nil { + in, out := &in.DebugLogging, &out.DebugLogging + *out = new(bool) + **out = **in + } + if in.EngineFamily != nil { + in, out := &in.EngineFamily, &out.EngineFamily + *out = new(string) + **out = **in + } + if in.IdleClientTimeout != nil { + in, out := &in.IdleClientTimeout, &out.IdleClientTimeout + *out = new(float64) + **out = **in + } + if in.RequireTLS != nil { + in, out := &in.RequireTLS, &out.RequireTLS + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.VPCSubnetIds != nil { + in, out := &in.VPCSubnetIds, &out.VPCSubnetIds + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyInitParameters. +func (in *ProxyInitParameters) DeepCopy() *ProxyInitParameters { + if in == nil { + return nil + } + out := new(ProxyInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyList) DeepCopyInto(out *ProxyList) { *out = *in @@ -6296,7 +8490,8 @@ func (in *ProxyObservation) DeepCopyInto(out *ProxyObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6311,7 +8506,8 @@ func (in *ProxyObservation) DeepCopyInto(out *ProxyObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6392,6 +8588,16 @@ func (in *ProxyParameters) DeepCopyInto(out *ProxyParameters) { *out = new(string) **out = **in } + if in.RoleArnRef != nil { + in, out := &in.RoleArnRef, &out.RoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RoleArnSelector != nil { + in, out := &in.RoleArnSelector, &out.RoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(map[string]*string, len(*in)) @@ -6400,7 +8606,8 @@ func (in *ProxyParameters) DeepCopyInto(out *ProxyParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -6415,13 +8622,26 @@ func (in *ProxyParameters) DeepCopyInto(out *ProxyParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } (*out)[key] = outVal } } + if in.VPCSecurityGroupIDRefs != nil { + in, out := &in.VPCSecurityGroupIDRefs, &out.VPCSecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPCSecurityGroupIDSelector != nil { + in, out := &in.VPCSecurityGroupIDSelector, &out.VPCSecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.VPCSecurityGroupIds != nil { in, out := &in.VPCSecurityGroupIds, &out.VPCSecurityGroupIds *out = make([]*string, len(*in)) @@ -6461,6 +8681,7 @@ func (in *ProxySpec) DeepCopyInto(out *ProxySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec. @@ -6509,14 +8730,39 @@ func (in *ProxyTarget) DeepCopy() *ProxyTarget { return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProxyTarget) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProxyTarget) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyTargetInitParameters) DeepCopyInto(out *ProxyTargetInitParameters) { + *out = *in + if in.DBClusterIdentifier != nil { + in, out := &in.DBClusterIdentifier, &out.DBClusterIdentifier + *out = new(string) + **out = **in + } + if in.TargetGroupName != nil { + in, out := &in.TargetGroupName, &out.TargetGroupName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTargetInitParameters. +func (in *ProxyTargetInitParameters) DeepCopy() *ProxyTargetInitParameters { + if in == nil { + return nil + } + out := new(ProxyTargetInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyTargetList) DeepCopyInto(out *ProxyTargetList) { *out = *in @@ -6632,11 +8878,31 @@ func (in *ProxyTargetParameters) DeepCopyInto(out *ProxyTargetParameters) { *out = new(string) **out = **in } + if in.DBInstanceIdentifierRef != nil { + in, out := &in.DBInstanceIdentifierRef, &out.DBInstanceIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBInstanceIdentifierSelector != nil { + in, out := &in.DBInstanceIdentifierSelector, &out.DBInstanceIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.DBProxyName != nil { in, out := &in.DBProxyName, &out.DBProxyName *out = new(string) **out = **in } + if in.DBProxyNameRef != nil { + in, out := &in.DBProxyNameRef, &out.DBProxyNameRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBProxyNameSelector != nil { + in, out := &in.DBProxyNameSelector, &out.DBProxyNameSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -6664,6 +8930,7 @@ func (in *ProxyTargetSpec) DeepCopyInto(out *ProxyTargetSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTargetSpec. @@ -6693,6 +8960,46 @@ func (in *ProxyTargetStatus) DeepCopy() *ProxyTargetStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestoreToPointInTimeInitParameters) DeepCopyInto(out *RestoreToPointInTimeInitParameters) { + *out = *in + if in.RestoreTime != nil { + in, out := &in.RestoreTime, &out.RestoreTime + *out = new(string) + **out = **in + } + if in.SourceDBInstanceAutomatedBackupsArn != nil { + in, out := &in.SourceDBInstanceAutomatedBackupsArn, &out.SourceDBInstanceAutomatedBackupsArn + *out = new(string) + **out = **in + } + if in.SourceDBInstanceIdentifier != nil { + in, out := &in.SourceDBInstanceIdentifier, &out.SourceDBInstanceIdentifier + *out = new(string) + **out = **in + } + if in.SourceDbiResourceID != nil { + in, out := &in.SourceDbiResourceID, &out.SourceDbiResourceID + *out = new(string) + **out = **in + } + if in.UseLatestRestorableTime != nil { + in, out := &in.UseLatestRestorableTime, &out.UseLatestRestorableTime + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreToPointInTimeInitParameters. +func (in *RestoreToPointInTimeInitParameters) DeepCopy() *RestoreToPointInTimeInitParameters { + if in == nil { + return nil + } + out := new(RestoreToPointInTimeInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RestoreToPointInTimeObservation) DeepCopyInto(out *RestoreToPointInTimeObservation) { *out = *in @@ -6773,6 +9080,46 @@ func (in *RestoreToPointInTimeParameters) DeepCopy() *RestoreToPointInTimeParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *S3ImportInitParameters) DeepCopyInto(out *S3ImportInitParameters) { + *out = *in + if in.BucketName != nil { + in, out := &in.BucketName, &out.BucketName + *out = new(string) + **out = **in + } + if in.BucketPrefix != nil { + in, out := &in.BucketPrefix, &out.BucketPrefix + *out = new(string) + **out = **in + } + if in.IngestionRole != nil { + in, out := &in.IngestionRole, &out.IngestionRole + *out = new(string) + **out = **in + } + if in.SourceEngine != nil { + in, out := &in.SourceEngine, &out.SourceEngine + *out = new(string) + **out = **in + } + if in.SourceEngineVersion != nil { + in, out := &in.SourceEngineVersion, &out.SourceEngineVersion + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3ImportInitParameters. +func (in *S3ImportInitParameters) DeepCopy() *S3ImportInitParameters { + if in == nil { + return nil + } + out := new(S3ImportInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *S3ImportObservation) DeepCopyInto(out *S3ImportObservation) { *out = *in @@ -6853,6 +9200,46 @@ func (in *S3ImportParameters) DeepCopy() *S3ImportParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScalingConfigurationInitParameters) DeepCopyInto(out *ScalingConfigurationInitParameters) { + *out = *in + if in.AutoPause != nil { + in, out := &in.AutoPause, &out.AutoPause + *out = new(bool) + **out = **in + } + if in.MaxCapacity != nil { + in, out := &in.MaxCapacity, &out.MaxCapacity + *out = new(float64) + **out = **in + } + if in.MinCapacity != nil { + in, out := &in.MinCapacity, &out.MinCapacity + *out = new(float64) + **out = **in + } + if in.SecondsUntilAutoPause != nil { + in, out := &in.SecondsUntilAutoPause, &out.SecondsUntilAutoPause + *out = new(float64) + **out = **in + } + if in.TimeoutAction != nil { + in, out := &in.TimeoutAction, &out.TimeoutAction + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingConfigurationInitParameters. +func (in *ScalingConfigurationInitParameters) DeepCopy() *ScalingConfigurationInitParameters { + if in == nil { + return nil + } + out := new(ScalingConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ScalingConfigurationObservation) DeepCopyInto(out *ScalingConfigurationObservation) { *out = *in @@ -6933,6 +9320,31 @@ func (in *ScalingConfigurationParameters) DeepCopy() *ScalingConfigurationParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Serverlessv2ScalingConfigurationInitParameters) DeepCopyInto(out *Serverlessv2ScalingConfigurationInitParameters) { + *out = *in + if in.MaxCapacity != nil { + in, out := &in.MaxCapacity, &out.MaxCapacity + *out = new(float64) + **out = **in + } + if in.MinCapacity != nil { + in, out := &in.MinCapacity, &out.MinCapacity + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Serverlessv2ScalingConfigurationInitParameters. +func (in *Serverlessv2ScalingConfigurationInitParameters) DeepCopy() *Serverlessv2ScalingConfigurationInitParameters { + if in == nil { + return nil + } + out := new(Serverlessv2ScalingConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Serverlessv2ScalingConfigurationObservation) DeepCopyInto(out *Serverlessv2ScalingConfigurationObservation) { *out = *in @@ -7010,6 +9422,64 @@ func (in *Snapshot) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SnapshotInitParameters) DeepCopyInto(out *SnapshotInitParameters) { + *out = *in + if in.SharedAccounts != nil { + in, out := &in.SharedAccounts, &out.SharedAccounts + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotInitParameters. +func (in *SnapshotInitParameters) DeepCopy() *SnapshotInitParameters { + if in == nil { + return nil + } + out := new(SnapshotInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SnapshotList) DeepCopyInto(out *SnapshotList) { *out = *in @@ -7154,7 +9624,8 @@ func (in *SnapshotObservation) DeepCopyInto(out *SnapshotObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7169,7 +9640,8 @@ func (in *SnapshotObservation) DeepCopyInto(out *SnapshotObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7201,6 +9673,16 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { *out = new(string) **out = **in } + if in.DBInstanceIdentifierRef != nil { + in, out := &in.DBInstanceIdentifierRef, &out.DBInstanceIdentifierRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.DBInstanceIdentifierSelector != nil { + in, out := &in.DBInstanceIdentifierSelector, &out.DBInstanceIdentifierSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -7225,7 +9707,8 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7240,7 +9723,8 @@ func (in *SnapshotParameters) DeepCopyInto(out *SnapshotParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7264,6 +9748,7 @@ func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec. @@ -7320,6 +9805,58 @@ func (in *SubnetGroup) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetGroupInitParameters) DeepCopyInto(out *SubnetGroupInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupInitParameters. +func (in *SubnetGroupInitParameters) DeepCopy() *SubnetGroupInitParameters { + if in == nil { + return nil + } + out := new(SubnetGroupInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SubnetGroupList) DeepCopyInto(out *SubnetGroupList) { *out = *in @@ -7400,7 +9937,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7415,7 +9953,8 @@ func (in *SubnetGroupObservation) DeepCopyInto(out *SubnetGroupObservation) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7452,6 +9991,18 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { *out = new(string) **out = **in } + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubnetIds != nil { in, out := &in.SubnetIds, &out.SubnetIds *out = make([]*string, len(*in)) @@ -7471,7 +10022,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7486,7 +10038,8 @@ func (in *SubnetGroupParameters) DeepCopyInto(out *SubnetGroupParameters) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -7510,6 +10063,7 @@ func (in *SubnetGroupSpec) DeepCopyInto(out *SubnetGroupSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGroupSpec. diff --git a/apis/rds/v1alpha1/zz_generated.managed.go b/apis/rds/v1alpha1/zz_generated.managed.go index b2e32b8..ac020ce 100644 --- a/apis/rds/v1alpha1/zz_generated.managed.go +++ b/apis/rds/v1alpha1/zz_generated.managed.go @@ -17,9 +17,9 @@ func (mg *Cluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Cluster. -func (mg *Cluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Cluster. +func (mg *Cluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Cluster. @@ -27,14 +27,6 @@ func (mg *Cluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Cluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Cluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -55,9 +47,9 @@ func (mg *Cluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Cluster. -func (mg *Cluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Cluster. +func (mg *Cluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Cluster. @@ -65,14 +57,6 @@ func (mg *Cluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Cluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Cluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Cluster. func (mg *Cluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -93,9 +77,9 @@ func (mg *ClusterActivityStream) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterActivityStream. -func (mg *ClusterActivityStream) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterActivityStream. +func (mg *ClusterActivityStream) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterActivityStream. @@ -103,14 +87,6 @@ func (mg *ClusterActivityStream) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterActivityStream. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterActivityStream) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterActivityStream. func (mg *ClusterActivityStream) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -131,9 +107,9 @@ func (mg *ClusterActivityStream) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterActivityStream. -func (mg *ClusterActivityStream) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterActivityStream. +func (mg *ClusterActivityStream) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterActivityStream. @@ -141,14 +117,6 @@ func (mg *ClusterActivityStream) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterActivityStream. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterActivityStream) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterActivityStream. func (mg *ClusterActivityStream) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -169,9 +137,9 @@ func (mg *ClusterEndpoint) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterEndpoint. -func (mg *ClusterEndpoint) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterEndpoint. +func (mg *ClusterEndpoint) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterEndpoint. @@ -179,14 +147,6 @@ func (mg *ClusterEndpoint) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterEndpoint. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterEndpoint) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterEndpoint. func (mg *ClusterEndpoint) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -207,9 +167,9 @@ func (mg *ClusterEndpoint) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterEndpoint. -func (mg *ClusterEndpoint) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterEndpoint. +func (mg *ClusterEndpoint) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterEndpoint. @@ -217,14 +177,6 @@ func (mg *ClusterEndpoint) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterEndpoint. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterEndpoint) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterEndpoint. func (mg *ClusterEndpoint) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -245,9 +197,9 @@ func (mg *ClusterInstance) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterInstance. -func (mg *ClusterInstance) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterInstance. +func (mg *ClusterInstance) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterInstance. @@ -255,14 +207,6 @@ func (mg *ClusterInstance) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterInstance. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterInstance) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterInstance. func (mg *ClusterInstance) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -283,9 +227,9 @@ func (mg *ClusterInstance) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterInstance. -func (mg *ClusterInstance) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterInstance. +func (mg *ClusterInstance) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterInstance. @@ -293,14 +237,6 @@ func (mg *ClusterInstance) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterInstance. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterInstance) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterInstance. func (mg *ClusterInstance) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -321,9 +257,9 @@ func (mg *ClusterParameterGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterParameterGroup. -func (mg *ClusterParameterGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterParameterGroup. +func (mg *ClusterParameterGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterParameterGroup. @@ -331,14 +267,6 @@ func (mg *ClusterParameterGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterParameterGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterParameterGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterParameterGroup. func (mg *ClusterParameterGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -359,9 +287,9 @@ func (mg *ClusterParameterGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterParameterGroup. -func (mg *ClusterParameterGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterParameterGroup. +func (mg *ClusterParameterGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterParameterGroup. @@ -369,14 +297,6 @@ func (mg *ClusterParameterGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterParameterGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterParameterGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterParameterGroup. func (mg *ClusterParameterGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -397,9 +317,9 @@ func (mg *ClusterRoleAssociation) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterRoleAssociation. -func (mg *ClusterRoleAssociation) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterRoleAssociation. +func (mg *ClusterRoleAssociation) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterRoleAssociation. @@ -407,14 +327,6 @@ func (mg *ClusterRoleAssociation) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterRoleAssociation. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterRoleAssociation) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterRoleAssociation. func (mg *ClusterRoleAssociation) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -435,9 +347,9 @@ func (mg *ClusterRoleAssociation) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterRoleAssociation. -func (mg *ClusterRoleAssociation) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterRoleAssociation. +func (mg *ClusterRoleAssociation) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterRoleAssociation. @@ -445,14 +357,6 @@ func (mg *ClusterRoleAssociation) SetProviderConfigReference(r *xpv1.Reference) mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterRoleAssociation. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterRoleAssociation) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterRoleAssociation. func (mg *ClusterRoleAssociation) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -473,9 +377,9 @@ func (mg *ClusterSnapshot) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ClusterSnapshot. -func (mg *ClusterSnapshot) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ClusterSnapshot. +func (mg *ClusterSnapshot) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ClusterSnapshot. @@ -483,14 +387,6 @@ func (mg *ClusterSnapshot) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ClusterSnapshot. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ClusterSnapshot) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ClusterSnapshot. func (mg *ClusterSnapshot) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -511,9 +407,9 @@ func (mg *ClusterSnapshot) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ClusterSnapshot. -func (mg *ClusterSnapshot) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ClusterSnapshot. +func (mg *ClusterSnapshot) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ClusterSnapshot. @@ -521,14 +417,6 @@ func (mg *ClusterSnapshot) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ClusterSnapshot. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ClusterSnapshot) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ClusterSnapshot. func (mg *ClusterSnapshot) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -549,9 +437,9 @@ func (mg *DBInstanceAutomatedBackupsReplication) GetDeletionPolicy() xpv1.Deleti return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this DBInstanceAutomatedBackupsReplication. -func (mg *DBInstanceAutomatedBackupsReplication) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this DBInstanceAutomatedBackupsReplication. +func (mg *DBInstanceAutomatedBackupsReplication) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this DBInstanceAutomatedBackupsReplication. @@ -559,14 +447,6 @@ func (mg *DBInstanceAutomatedBackupsReplication) GetProviderConfigReference() *x return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DBInstanceAutomatedBackupsReplication. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DBInstanceAutomatedBackupsReplication) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DBInstanceAutomatedBackupsReplication. func (mg *DBInstanceAutomatedBackupsReplication) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -587,9 +467,9 @@ func (mg *DBInstanceAutomatedBackupsReplication) SetDeletionPolicy(r xpv1.Deleti mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this DBInstanceAutomatedBackupsReplication. -func (mg *DBInstanceAutomatedBackupsReplication) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this DBInstanceAutomatedBackupsReplication. +func (mg *DBInstanceAutomatedBackupsReplication) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this DBInstanceAutomatedBackupsReplication. @@ -597,14 +477,6 @@ func (mg *DBInstanceAutomatedBackupsReplication) SetProviderConfigReference(r *x mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DBInstanceAutomatedBackupsReplication. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DBInstanceAutomatedBackupsReplication) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DBInstanceAutomatedBackupsReplication. func (mg *DBInstanceAutomatedBackupsReplication) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -625,9 +497,9 @@ func (mg *DBSnapshotCopy) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this DBSnapshotCopy. -func (mg *DBSnapshotCopy) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this DBSnapshotCopy. +func (mg *DBSnapshotCopy) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this DBSnapshotCopy. @@ -635,14 +507,6 @@ func (mg *DBSnapshotCopy) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DBSnapshotCopy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DBSnapshotCopy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DBSnapshotCopy. func (mg *DBSnapshotCopy) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -663,9 +527,9 @@ func (mg *DBSnapshotCopy) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this DBSnapshotCopy. -func (mg *DBSnapshotCopy) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this DBSnapshotCopy. +func (mg *DBSnapshotCopy) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this DBSnapshotCopy. @@ -673,14 +537,6 @@ func (mg *DBSnapshotCopy) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DBSnapshotCopy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DBSnapshotCopy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DBSnapshotCopy. func (mg *DBSnapshotCopy) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -701,9 +557,9 @@ func (mg *EventSubscription) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this EventSubscription. -func (mg *EventSubscription) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this EventSubscription. +func (mg *EventSubscription) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this EventSubscription. @@ -711,14 +567,6 @@ func (mg *EventSubscription) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this EventSubscription. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *EventSubscription) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this EventSubscription. func (mg *EventSubscription) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -739,9 +587,9 @@ func (mg *EventSubscription) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this EventSubscription. -func (mg *EventSubscription) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this EventSubscription. +func (mg *EventSubscription) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this EventSubscription. @@ -749,14 +597,6 @@ func (mg *EventSubscription) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this EventSubscription. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *EventSubscription) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this EventSubscription. func (mg *EventSubscription) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -777,9 +617,9 @@ func (mg *GlobalCluster) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this GlobalCluster. -func (mg *GlobalCluster) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this GlobalCluster. +func (mg *GlobalCluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this GlobalCluster. @@ -787,14 +627,6 @@ func (mg *GlobalCluster) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this GlobalCluster. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *GlobalCluster) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this GlobalCluster. func (mg *GlobalCluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -815,9 +647,9 @@ func (mg *GlobalCluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this GlobalCluster. -func (mg *GlobalCluster) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this GlobalCluster. +func (mg *GlobalCluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this GlobalCluster. @@ -825,14 +657,6 @@ func (mg *GlobalCluster) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this GlobalCluster. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *GlobalCluster) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this GlobalCluster. func (mg *GlobalCluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -853,9 +677,9 @@ func (mg *Instance) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Instance. -func (mg *Instance) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Instance. +func (mg *Instance) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Instance. @@ -863,14 +687,6 @@ func (mg *Instance) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Instance. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Instance) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Instance. func (mg *Instance) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -891,9 +707,9 @@ func (mg *Instance) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Instance. -func (mg *Instance) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Instance. +func (mg *Instance) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Instance. @@ -901,14 +717,6 @@ func (mg *Instance) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Instance. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Instance) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Instance. func (mg *Instance) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -929,9 +737,9 @@ func (mg *InstanceRoleAssociation) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this InstanceRoleAssociation. -func (mg *InstanceRoleAssociation) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this InstanceRoleAssociation. +func (mg *InstanceRoleAssociation) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this InstanceRoleAssociation. @@ -939,14 +747,6 @@ func (mg *InstanceRoleAssociation) GetProviderConfigReference() *xpv1.Reference return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this InstanceRoleAssociation. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *InstanceRoleAssociation) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this InstanceRoleAssociation. func (mg *InstanceRoleAssociation) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -967,9 +767,9 @@ func (mg *InstanceRoleAssociation) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this InstanceRoleAssociation. -func (mg *InstanceRoleAssociation) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this InstanceRoleAssociation. +func (mg *InstanceRoleAssociation) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this InstanceRoleAssociation. @@ -977,14 +777,6 @@ func (mg *InstanceRoleAssociation) SetProviderConfigReference(r *xpv1.Reference) mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this InstanceRoleAssociation. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *InstanceRoleAssociation) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this InstanceRoleAssociation. func (mg *InstanceRoleAssociation) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1005,9 +797,9 @@ func (mg *OptionGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this OptionGroup. -func (mg *OptionGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this OptionGroup. +func (mg *OptionGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this OptionGroup. @@ -1015,14 +807,6 @@ func (mg *OptionGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this OptionGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *OptionGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this OptionGroup. func (mg *OptionGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1043,9 +827,9 @@ func (mg *OptionGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this OptionGroup. -func (mg *OptionGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this OptionGroup. +func (mg *OptionGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this OptionGroup. @@ -1053,14 +837,6 @@ func (mg *OptionGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this OptionGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *OptionGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this OptionGroup. func (mg *OptionGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1081,9 +857,9 @@ func (mg *ParameterGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ParameterGroup. @@ -1091,14 +867,6 @@ func (mg *ParameterGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ParameterGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ParameterGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1119,9 +887,9 @@ func (mg *ParameterGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ParameterGroup. -func (mg *ParameterGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ParameterGroup. +func (mg *ParameterGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ParameterGroup. @@ -1129,14 +897,6 @@ func (mg *ParameterGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ParameterGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ParameterGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ParameterGroup. func (mg *ParameterGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1157,9 +917,9 @@ func (mg *Proxy) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Proxy. -func (mg *Proxy) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Proxy. +func (mg *Proxy) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Proxy. @@ -1167,14 +927,6 @@ func (mg *Proxy) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Proxy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Proxy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Proxy. func (mg *Proxy) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1195,9 +947,9 @@ func (mg *Proxy) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Proxy. -func (mg *Proxy) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Proxy. +func (mg *Proxy) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Proxy. @@ -1205,14 +957,6 @@ func (mg *Proxy) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Proxy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Proxy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Proxy. func (mg *Proxy) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1233,9 +977,9 @@ func (mg *ProxyDefaultTargetGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ProxyDefaultTargetGroup. -func (mg *ProxyDefaultTargetGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ProxyDefaultTargetGroup. +func (mg *ProxyDefaultTargetGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ProxyDefaultTargetGroup. @@ -1243,14 +987,6 @@ func (mg *ProxyDefaultTargetGroup) GetProviderConfigReference() *xpv1.Reference return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ProxyDefaultTargetGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ProxyDefaultTargetGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ProxyDefaultTargetGroup. func (mg *ProxyDefaultTargetGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1271,9 +1007,9 @@ func (mg *ProxyDefaultTargetGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ProxyDefaultTargetGroup. -func (mg *ProxyDefaultTargetGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ProxyDefaultTargetGroup. +func (mg *ProxyDefaultTargetGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ProxyDefaultTargetGroup. @@ -1281,14 +1017,6 @@ func (mg *ProxyDefaultTargetGroup) SetProviderConfigReference(r *xpv1.Reference) mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ProxyDefaultTargetGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ProxyDefaultTargetGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ProxyDefaultTargetGroup. func (mg *ProxyDefaultTargetGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1309,9 +1037,9 @@ func (mg *ProxyEndpoint) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ProxyEndpoint. -func (mg *ProxyEndpoint) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ProxyEndpoint. +func (mg *ProxyEndpoint) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ProxyEndpoint. @@ -1319,14 +1047,6 @@ func (mg *ProxyEndpoint) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ProxyEndpoint. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ProxyEndpoint) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ProxyEndpoint. func (mg *ProxyEndpoint) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1347,9 +1067,9 @@ func (mg *ProxyEndpoint) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ProxyEndpoint. -func (mg *ProxyEndpoint) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ProxyEndpoint. +func (mg *ProxyEndpoint) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ProxyEndpoint. @@ -1357,14 +1077,6 @@ func (mg *ProxyEndpoint) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ProxyEndpoint. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ProxyEndpoint) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ProxyEndpoint. func (mg *ProxyEndpoint) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1385,9 +1097,9 @@ func (mg *ProxyTarget) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this ProxyTarget. -func (mg *ProxyTarget) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this ProxyTarget. +func (mg *ProxyTarget) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this ProxyTarget. @@ -1395,14 +1107,6 @@ func (mg *ProxyTarget) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ProxyTarget. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ProxyTarget) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ProxyTarget. func (mg *ProxyTarget) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1423,9 +1127,9 @@ func (mg *ProxyTarget) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this ProxyTarget. -func (mg *ProxyTarget) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this ProxyTarget. +func (mg *ProxyTarget) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this ProxyTarget. @@ -1433,14 +1137,6 @@ func (mg *ProxyTarget) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ProxyTarget. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ProxyTarget) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ProxyTarget. func (mg *ProxyTarget) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1461,9 +1157,9 @@ func (mg *Snapshot) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this Snapshot. -func (mg *Snapshot) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this Snapshot. +func (mg *Snapshot) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this Snapshot. @@ -1471,14 +1167,6 @@ func (mg *Snapshot) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Snapshot. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Snapshot) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Snapshot. func (mg *Snapshot) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1499,9 +1187,9 @@ func (mg *Snapshot) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this Snapshot. -func (mg *Snapshot) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this Snapshot. +func (mg *Snapshot) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this Snapshot. @@ -1509,14 +1197,6 @@ func (mg *Snapshot) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Snapshot. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Snapshot) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Snapshot. func (mg *Snapshot) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -1537,9 +1217,9 @@ func (mg *SubnetGroup) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } -// GetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) GetManagementPolicy() xpv1.ManagementPolicy { - return mg.Spec.ManagementPolicy +// GetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies } // GetProviderConfigReference of this SubnetGroup. @@ -1547,14 +1227,6 @@ func (mg *SubnetGroup) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this SubnetGroup. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *SubnetGroup) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -1575,9 +1247,9 @@ func (mg *SubnetGroup) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } -// SetManagementPolicy of this SubnetGroup. -func (mg *SubnetGroup) SetManagementPolicy(r xpv1.ManagementPolicy) { - mg.Spec.ManagementPolicy = r +// SetManagementPolicies of this SubnetGroup. +func (mg *SubnetGroup) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r } // SetProviderConfigReference of this SubnetGroup. @@ -1585,14 +1257,6 @@ func (mg *SubnetGroup) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this SubnetGroup. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *SubnetGroup) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this SubnetGroup. func (mg *SubnetGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/rds/v1alpha1/zz_generated.resolvers.go b/apis/rds/v1alpha1/zz_generated.resolvers.go index 6564809..9ea898e 100644 --- a/apis/rds/v1alpha1/zz_generated.resolvers.go +++ b/apis/rds/v1alpha1/zz_generated.resolvers.go @@ -8,11 +8,14 @@ package v1alpha1 import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - v1beta11 "github.com/upbound/provider-aws/apis/kms/v1beta1" - v1beta1 "github.com/upbound/provider-aws/apis/s3/v1beta1" - common "github.com/upbound/provider-aws/config/common" + v1alpha11 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + v1alpha12 "kubedb.dev/provider-aws/apis/iam/v1alpha1" v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + v1alpha14 "kubedb.dev/provider-aws/apis/secretsmanager/v1alpha1" + v1alpha13 "kubedb.dev/provider-aws/apis/sns/v1alpha1" + common "kubedb.dev/provider-aws/config/common" client "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -21,6 +24,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -39,6 +43,38 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBSubnetGroupNameRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MasterUserSecretKMSKeyID), + Extract: resource.ExtractParamPath("key_id", true), + Reference: mg.Spec.ForProvider.MasterUserSecretKMSKeyIDRef, + Selector: mg.Spec.ForProvider.MasterUserSecretKMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.MasterUserSecretKMSKeyID") + } + mg.Spec.ForProvider.MasterUserSecretKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.MasterUserSecretKMSKeyIDRef = rsp.ResolvedReference + for i3 := 0; i3 < len(mg.Spec.ForProvider.RestoreToPointInTime); i3++ { rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RestoreToPointInTime[i3].SourceClusterIdentifier), @@ -57,24 +93,89 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RestoreToPointInTime[i3].SourceClusterIdentifierRef = rsp.ResolvedReference } - for i3 := 0; i3 < len(mg.Spec.ForProvider.S3Import); i3++ { - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.S3Import[i3].BucketName), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.S3Import[i3].BucketNameRef, - Selector: mg.Spec.ForProvider.S3Import[i3].BucketNameSelector, - To: reference.To{ - List: &v1beta1.BucketList{}, - Managed: &v1beta1.Bucket{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.S3Import[i3].BucketName") - } - mg.Spec.ForProvider.S3Import[i3].BucketName = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.S3Import[i3].BucketNameRef = rsp.ResolvedReference + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCSecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCSecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCSecurityGroupIds") + } + mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences + return nil +} + +// ResolveReferences of this ClusterActivityStream. +func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ResourceArn), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.ResourceArnRef, + Selector: mg.Spec.ForProvider.ResourceArnSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ResourceArn") + } + mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this ClusterEndpoint. +func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ClusterIdentifier), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.ClusterIdentifierRef, + Selector: mg.Spec.ForProvider.ClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ClusterIdentifier") } + mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference return nil } @@ -86,6 +187,22 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade var rsp reference.ResolutionResponse var err error + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ClusterIdentifier), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.ClusterIdentifierRef, + Selector: mg.Spec.ForProvider.ClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ClusterIdentifier") + } + mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBSubnetGroupName), Extract: reference.ExternalName(), @@ -102,14 +219,30 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBSubnetGroupNameRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MonitoringRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.MonitoringRoleArnRef, + Selector: mg.Spec.ForProvider.MonitoringRoleArnSelector, + To: reference.To{ + List: &v1alpha12.RoleList{}, + Managed: &v1alpha12.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.MonitoringRoleArn") + } + mg.Spec.ForProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.MonitoringRoleArnRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PerformanceInsightsKMSKeyID), Extract: reference.ExternalName(), Reference: mg.Spec.ForProvider.PerformanceInsightsKMSKeyIDRef, Selector: mg.Spec.ForProvider.PerformanceInsightsKMSKeyIDSelector, To: reference.To{ - List: &v1beta11.KeyList{}, - Managed: &v1beta11.Key{}, + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, }, }) if err != nil { @@ -121,11 +254,216 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade return nil } +// ResolveReferences of this ClusterRoleAssociation. +func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBClusterIdentifier), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.DBClusterIdentifierRef, + Selector: mg.Spec.ForProvider.DBClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBClusterIdentifier") + } + mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.RoleArnRef, + Selector: mg.Spec.ForProvider.RoleArnSelector, + To: reference.To{ + List: &v1alpha12.RoleList{}, + Managed: &v1alpha12.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.RoleArn") + } + mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this ClusterSnapshot. +func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBClusterIdentifier), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.DBClusterIdentifierRef, + Selector: mg.Spec.ForProvider.DBClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBClusterIdentifier") + } + mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this DBInstanceAutomatedBackupsReplication. +func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceDBInstanceArn), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.SourceDBInstanceArnRef, + Selector: mg.Spec.ForProvider.SourceDBInstanceArnSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SourceDBInstanceArn") + } + mg.Spec.ForProvider.SourceDBInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SourceDBInstanceArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this DBSnapshotCopy. +func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceDBSnapshotIdentifier), + Extract: resource.ExtractParamPath("db_snapshot_arn", true), + Reference: mg.Spec.ForProvider.SourceDBSnapshotIdentifierRef, + Selector: mg.Spec.ForProvider.SourceDBSnapshotIdentifierSelector, + To: reference.To{ + List: &SnapshotList{}, + Managed: &Snapshot{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SourceDBSnapshotIdentifier") + } + mg.Spec.ForProvider.SourceDBSnapshotIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SourceDBSnapshotIdentifierRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this EventSubscription. +func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SnsTopic), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.SnsTopicRef, + Selector: mg.Spec.ForProvider.SnsTopicSelector, + To: reference.To{ + List: &v1alpha13.TopicList{}, + Managed: &v1alpha13.Topic{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SnsTopic") + } + mg.Spec.ForProvider.SnsTopic = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SnsTopicRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this GlobalCluster. +func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceDBClusterIdentifier), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.SourceDBClusterIdentifierRef, + Selector: mg.Spec.ForProvider.SourceDBClusterIdentifierSelector, + To: reference.To{ + List: &ClusterList{}, + Managed: &Cluster{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SourceDBClusterIdentifier") + } + mg.Spec.ForProvider.SourceDBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SourceDBClusterIdentifierRef = rsp.ResolvedReference + + return nil +} + // ResolveReferences of this Instance. func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -160,5 +498,335 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MasterUserSecretKMSKeyID), + Extract: resource.ExtractParamPath("key_id", true), + Reference: mg.Spec.ForProvider.MasterUserSecretKMSKeyIDRef, + Selector: mg.Spec.ForProvider.MasterUserSecretKMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.MasterUserSecretKMSKeyID") + } + mg.Spec.ForProvider.MasterUserSecretKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.MasterUserSecretKMSKeyIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MonitoringRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.MonitoringRoleArnRef, + Selector: mg.Spec.ForProvider.MonitoringRoleArnSelector, + To: reference.To{ + List: &v1alpha12.RoleList{}, + Managed: &v1alpha12.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.MonitoringRoleArn") + } + mg.Spec.ForProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.MonitoringRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ReplicateSourceDB), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.ReplicateSourceDBRef, + Selector: mg.Spec.ForProvider.ReplicateSourceDBSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ReplicateSourceDB") + } + mg.Spec.ForProvider.ReplicateSourceDB = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ReplicateSourceDBRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCSecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCSecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCSecurityGroupIds") + } + mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences + + return nil +} + +// ResolveReferences of this InstanceRoleAssociation. +func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBInstanceIdentifier), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBInstanceIdentifierRef, + Selector: mg.Spec.ForProvider.DBInstanceIdentifierSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBInstanceIdentifier") + } + mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.RoleArnRef, + Selector: mg.Spec.ForProvider.RoleArnSelector, + To: reference.To{ + List: &v1alpha12.RoleList{}, + Managed: &v1alpha12.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.RoleArn") + } + mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this Proxy. +func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse + var err error + + for i3 := 0; i3 < len(mg.Spec.ForProvider.Auth); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Auth[i3].SecretArn), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.Auth[i3].SecretArnRef, + Selector: mg.Spec.ForProvider.Auth[i3].SecretArnSelector, + To: reference.To{ + List: &v1alpha14.SecretList{}, + Managed: &v1alpha14.Secret{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Auth[i3].SecretArn") + } + mg.Spec.ForProvider.Auth[i3].SecretArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Auth[i3].SecretArnRef = rsp.ResolvedReference + + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.RoleArnRef, + Selector: mg.Spec.ForProvider.RoleArnSelector, + To: reference.To{ + List: &v1alpha12.RoleList{}, + Managed: &v1alpha12.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.RoleArn") + } + mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCSecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCSecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCSecurityGroupIds") + } + mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences + + return nil +} + +// ResolveReferences of this ProxyDefaultTargetGroup. +func (mg *ProxyDefaultTargetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBProxyName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBProxyNameRef, + Selector: mg.Spec.ForProvider.DBProxyNameSelector, + To: reference.To{ + List: &ProxyList{}, + Managed: &Proxy{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBProxyName") + } + mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this ProxyEndpoint. +func (mg *ProxyEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBProxyName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBProxyNameRef, + Selector: mg.Spec.ForProvider.DBProxyNameSelector, + To: reference.To{ + List: &ProxyList{}, + Managed: &Proxy{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBProxyName") + } + mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCSecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCSecurityGroupIDSelector, + To: reference.To{ + List: &v1alpha11.SecurityGroupList{}, + Managed: &v1alpha11.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCSecurityGroupIds") + } + mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences + + return nil +} + +// ResolveReferences of this ProxyTarget. +func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBInstanceIdentifier), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBInstanceIdentifierRef, + Selector: mg.Spec.ForProvider.DBInstanceIdentifierSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBInstanceIdentifier") + } + mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBProxyName), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBProxyNameRef, + Selector: mg.Spec.ForProvider.DBProxyNameSelector, + To: reference.To{ + List: &ProxyList{}, + Managed: &Proxy{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBProxyName") + } + mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this Snapshot. +func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DBInstanceIdentifier), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.DBInstanceIdentifierRef, + Selector: mg.Spec.ForProvider.DBInstanceIdentifierSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DBInstanceIdentifier") + } + mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this SubnetGroup. +func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var mrsp reference.MultiResolutionResponse + var err error + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.SubnetIDRefs, + Selector: mg.Spec.ForProvider.SubnetIDSelector, + To: reference.To{ + List: &v1alpha11.SubnetList{}, + Managed: &v1alpha11.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetIds") + } + mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences + return nil } diff --git a/apis/rds/v1alpha1/zz_generated_terraformed.go b/apis/rds/v1alpha1/zz_generated_terraformed.go index a22550f..938363d 100755 --- a/apis/rds/v1alpha1/zz_generated_terraformed.go +++ b/apis/rds/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this ClusterSnapshot @@ -69,6 +74,46 @@ func (tr *ClusterSnapshot) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterSnapshot +func (tr *ClusterSnapshot) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterSnapshot +func (tr *ClusterSnapshot) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterSnapshot using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterSnapshot) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *EventSubscription) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this EventSubscription +func (tr *EventSubscription) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this EventSubscription +func (tr *EventSubscription) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this EventSubscription using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *EventSubscription) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *Instance) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Instance +func (tr *Instance) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Instance +func (tr *Instance) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Instance using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Instance) LateInitialize(attrs []byte) (bool, error) { @@ -292,6 +417,46 @@ func (tr *DBInstanceAutomatedBackupsReplication) SetParameters(params map[string return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DBInstanceAutomatedBackupsReplication +func (tr *DBInstanceAutomatedBackupsReplication) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DBInstanceAutomatedBackupsReplication +func (tr *DBInstanceAutomatedBackupsReplication) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DBInstanceAutomatedBackupsReplication using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DBInstanceAutomatedBackupsReplication) LateInitialize(attrs []byte) (bool, error) { @@ -366,6 +531,46 @@ func (tr *InstanceRoleAssociation) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this InstanceRoleAssociation +func (tr *InstanceRoleAssociation) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this InstanceRoleAssociation +func (tr *InstanceRoleAssociation) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this InstanceRoleAssociation using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *InstanceRoleAssociation) LateInitialize(attrs []byte) (bool, error) { @@ -440,6 +645,46 @@ func (tr *OptionGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this OptionGroup +func (tr *OptionGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this OptionGroup +func (tr *OptionGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this OptionGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *OptionGroup) LateInitialize(attrs []byte) (bool, error) { @@ -514,6 +759,46 @@ func (tr *ParameterGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ParameterGroup +func (tr *ParameterGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ParameterGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ParameterGroup) LateInitialize(attrs []byte) (bool, error) { @@ -588,6 +873,46 @@ func (tr *Proxy) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Proxy +func (tr *Proxy) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Proxy +func (tr *Proxy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Proxy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Proxy) LateInitialize(attrs []byte) (bool, error) { @@ -662,6 +987,46 @@ func (tr *ProxyDefaultTargetGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ProxyDefaultTargetGroup +func (tr *ProxyDefaultTargetGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ProxyDefaultTargetGroup +func (tr *ProxyDefaultTargetGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ProxyDefaultTargetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ProxyDefaultTargetGroup) LateInitialize(attrs []byte) (bool, error) { @@ -736,6 +1101,46 @@ func (tr *ProxyEndpoint) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ProxyEndpoint +func (tr *ProxyEndpoint) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ProxyEndpoint +func (tr *ProxyEndpoint) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ProxyEndpoint using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ProxyEndpoint) LateInitialize(attrs []byte) (bool, error) { @@ -810,6 +1215,46 @@ func (tr *ProxyTarget) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ProxyTarget +func (tr *ProxyTarget) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ProxyTarget +func (tr *ProxyTarget) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ProxyTarget using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ProxyTarget) LateInitialize(attrs []byte) (bool, error) { @@ -884,6 +1329,46 @@ func (tr *Snapshot) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Snapshot +func (tr *Snapshot) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Snapshot +func (tr *Snapshot) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Snapshot using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Snapshot) LateInitialize(attrs []byte) (bool, error) { @@ -958,6 +1443,46 @@ func (tr *DBSnapshotCopy) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DBSnapshotCopy +func (tr *DBSnapshotCopy) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DBSnapshotCopy +func (tr *DBSnapshotCopy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DBSnapshotCopy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DBSnapshotCopy) LateInitialize(attrs []byte) (bool, error) { @@ -1032,6 +1557,46 @@ func (tr *SubnetGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this SubnetGroup +func (tr *SubnetGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetGroup) LateInitialize(attrs []byte) (bool, error) { @@ -1106,6 +1671,46 @@ func (tr *Cluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Cluster +func (tr *Cluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Cluster +func (tr *Cluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Cluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Cluster) LateInitialize(attrs []byte) (bool, error) { @@ -1180,6 +1785,46 @@ func (tr *ClusterActivityStream) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterActivityStream +func (tr *ClusterActivityStream) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterActivityStream +func (tr *ClusterActivityStream) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterActivityStream using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterActivityStream) LateInitialize(attrs []byte) (bool, error) { @@ -1254,6 +1899,46 @@ func (tr *ClusterEndpoint) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterEndpoint +func (tr *ClusterEndpoint) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterEndpoint +func (tr *ClusterEndpoint) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterEndpoint using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterEndpoint) LateInitialize(attrs []byte) (bool, error) { @@ -1328,6 +2013,46 @@ func (tr *ClusterInstance) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterInstance +func (tr *ClusterInstance) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterInstance +func (tr *ClusterInstance) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterInstance using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterInstance) LateInitialize(attrs []byte) (bool, error) { @@ -1402,6 +2127,46 @@ func (tr *ClusterParameterGroup) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterParameterGroup +func (tr *ClusterParameterGroup) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterParameterGroup +func (tr *ClusterParameterGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterParameterGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterParameterGroup) LateInitialize(attrs []byte) (bool, error) { @@ -1476,6 +2241,46 @@ func (tr *ClusterRoleAssociation) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ClusterRoleAssociation +func (tr *ClusterRoleAssociation) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ClusterRoleAssociation +func (tr *ClusterRoleAssociation) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ClusterRoleAssociation using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ClusterRoleAssociation) LateInitialize(attrs []byte) (bool, error) { @@ -1550,6 +2355,46 @@ func (tr *GlobalCluster) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this GlobalCluster +func (tr *GlobalCluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalCluster +func (tr *GlobalCluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this GlobalCluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *GlobalCluster) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/rds/v1alpha1/zz_globalcluster_types.go b/apis/rds/v1alpha1/zz_globalcluster_types.go index 516ea83..5be9fd0 100755 --- a/apis/rds/v1alpha1/zz_globalcluster_types.go +++ b/apis/rds/v1alpha1/zz_globalcluster_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,30 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type GlobalClusterInitParameters struct { + + // Name for an automatically created database on cluster creation. + DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` + + // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. + DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + + // Name of the database engine to be used for this DB cluster. Valid values: aurora, aurora-mysql, aurora-postgresql. Defaults to aurora. Conflicts with source_db_cluster_identifier. + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // Engine version of the Aurora global database. The engine, engine_version, and instance_class (on the aws_rds_cluster_instance) must together support global databases. See Using Amazon Aurora global databases for more information. NOTE: To avoid an inconsistent final plan error while upgrading, use the lifecycle ignore_changes for engine_version meta argument on the associated aws_rds_cluster resource as shown above in Upgrading Engine Versions example. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // Enable to remove DB Cluster members from Global Cluster on destroy. Required with source_db_cluster_identifier. + ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` + + // Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. + StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` +} + +type GlobalClusterMembersInitParameters struct { +} + type GlobalClusterMembersObservation struct { // Amazon Resource Name (ARN) of member DB Cluster @@ -91,9 +119,19 @@ type GlobalClusterParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Cluster + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SourceDBClusterIdentifier *string `json:"sourceDbClusterIdentifier,omitempty" tf:"source_db_cluster_identifier,omitempty"` + // Reference to a Cluster in rds to populate sourceDbClusterIdentifier. + // +kubebuilder:validation:Optional + SourceDBClusterIdentifierRef *v1.Reference `json:"sourceDbClusterIdentifierRef,omitempty" tf:"-"` + + // Selector for a Cluster in rds to populate sourceDbClusterIdentifier. + // +kubebuilder:validation:Optional + SourceDBClusterIdentifierSelector *v1.Selector `json:"sourceDbClusterIdentifierSelector,omitempty" tf:"-"` + // Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. // +kubebuilder:validation:Optional StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` @@ -103,6 +141,17 @@ type GlobalClusterParameters struct { type GlobalClusterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider GlobalClusterParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 GlobalClusterInitParameters `json:"initProvider,omitempty"` } // GlobalClusterStatus defines the observed state of GlobalCluster. @@ -123,7 +172,7 @@ type GlobalClusterStatus struct { type GlobalCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec GlobalClusterSpec `json:"spec"` Status GlobalClusterStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_groupversion_info.go b/apis/rds/v1alpha1/zz_groupversion_info.go index 3d0d2f5..829f4b4 100755 --- a/apis/rds/v1alpha1/zz_groupversion_info.go +++ b/apis/rds/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/apis/rds/v1alpha1/zz_instance_types.go b/apis/rds/v1alpha1/zz_instance_types.go index efb813a..cb4bb21 100755 --- a/apis/rds/v1alpha1/zz_instance_types.go +++ b/apis/rds/v1alpha1/zz_instance_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,13 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type BlueGreenUpdateInitParameters struct { + + // Enables [low-downtime updates](#Low-Downtime Updates) when true. + // Default is false. + Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +} + type BlueGreenUpdateObservation struct { // Enables [low-downtime updates](#Low-Downtime Updates) when true. @@ -28,6 +39,215 @@ type BlueGreenUpdateParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } +type InstanceInitParameters struct { + + // The allocated storage in gibibytes. If max_allocated_storage is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs. If replicate_source_db is set, the value is ignored during the creation of the instance. + AllocatedStorage *float64 `json:"allocatedStorage,omitempty" tf:"allocated_storage,omitempty"` + + // Indicates that major version + // upgrades are allowed. Changing this parameter does not result in an outage and + // the change is asynchronously applied as soon as possible. + AllowMajorVersionUpgrade *bool `json:"allowMajorVersionUpgrade,omitempty" tf:"allow_major_version_upgrade,omitempty"` + + // Specifies whether any database modifications + // are applied immediately, or during the next maintenance window. Default is + // false. See Amazon RDS Documentation for more + // information. + ApplyImmediately *bool `json:"applyImmediately,omitempty" tf:"apply_immediately,omitempty"` + + // Indicates that minor engine upgrades + // will be applied automatically to the DB instance during the maintenance window. + // Defaults to true. + AutoMinorVersionUpgrade *bool `json:"autoMinorVersionUpgrade,omitempty" tf:"auto_minor_version_upgrade,omitempty"` + + // The AZ for the RDS instance. + AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"` + + // The days to retain backups for. + // Must be between 0 and 35. + // Default is 0. + // Must be greater than 0 if the database is used as a source for a Read Replica, + // uses low-downtime updates, + // or will use RDS Blue/Green deployments. + BackupRetentionPeriod *float64 `json:"backupRetentionPeriod,omitempty" tf:"backup_retention_period,omitempty"` + + // The daily time range (in UTC) during which automated backups are created if they are enabled. + // Example: "09:46-10:16". Must not overlap with maintenance_window. + BackupWindow *string `json:"backupWindow,omitempty" tf:"backup_window,omitempty"` + + // Enables low-downtime updates using RDS Blue/Green deployments. + // See blue_green_update below + BlueGreenUpdate []BlueGreenUpdateInitParameters `json:"blueGreenUpdate,omitempty" tf:"blue_green_update,omitempty"` + + // The identifier of the CA certificate for the DB instance. + CACertIdentifier *string `json:"caCertIdentifier,omitempty" tf:"ca_cert_identifier,omitempty"` + + // The character set name to use for DB + // encoding in Oracle and Microsoft SQL instances (collation). This can't be changed. See Oracle Character Sets + // Supported in Amazon RDS + // or Server-Level Collation for Microsoft SQL Server for more information. + CharacterSetName *string `json:"characterSetName,omitempty" tf:"character_set_name,omitempty"` + + // – Copy all Instance tags to snapshots. Default is false. + CopyTagsToSnapshot *bool `json:"copyTagsToSnapshot,omitempty" tf:"copy_tags_to_snapshot,omitempty"` + + // The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. + CustomIAMInstanceProfile *string `json:"customIamInstanceProfile,omitempty" tf:"custom_iam_instance_profile,omitempty"` + + // Indicates whether to enable a customer-owned IP address (CoIP) for an RDS on Outposts DB instance. See CoIP for RDS on Outposts for more information. + CustomerOwnedIPEnabled *bool `json:"customerOwnedIpEnabled,omitempty" tf:"customer_owned_ip_enabled,omitempty"` + + // The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. Note that this does not apply for Oracle or SQL Server engines. See the AWS documentation for more details on what applies for those engines. If you are providing an Oracle db name, it needs to be in all upper case. Cannot be specified for a replica. + DBName *string `json:"dbName,omitempty" tf:"db_name,omitempty"` + + // Specifies whether to remove automated backups immediately after the DB instance is deleted. Default is true. + DeleteAutomatedBackups *bool `json:"deleteAutomatedBackups,omitempty" tf:"delete_automated_backups,omitempty"` + + // If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. + DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + + // The ID of the Directory Service Active Directory domain to create the instance in. + Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` + + // The name of the IAM role to be used when making API calls to the Directory Service. + DomainIAMRoleName *string `json:"domainIamRoleName,omitempty" tf:"domain_iam_role_name,omitempty"` + + // Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on engine). MySQL and MariaDB: audit, error, general, slowquery. PostgreSQL: postgresql, upgrade. MSSQL: agent , error. Oracle: alert, audit, listener, trace. + EnabledCloudwatchLogsExports []*string `json:"enabledCloudwatchLogsExports,omitempty" tf:"enabled_cloudwatch_logs_exports,omitempty"` + + // The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). + Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` + + // The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'. + EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` + + // The name of your final DB snapshot + // when this DB instance is deleted. Must be provided if skip_final_snapshot is + // set to false. The value must begin with a letter, only contain alphanumeric characters and hyphens, and not end with a hyphen or contain two consecutive hyphens. Must not be provided when deleting a read replica. + FinalSnapshotIdentifier *string `json:"finalSnapshotIdentifier,omitempty" tf:"final_snapshot_identifier,omitempty"` + + // Specifies whether mappings of AWS Identity and Access Management (IAM) accounts to database + // accounts is enabled. + IAMDatabaseAuthenticationEnabled *bool `json:"iamDatabaseAuthenticationEnabled,omitempty" tf:"iam_database_authentication_enabled,omitempty"` + + // The instance type of the RDS instance. + InstanceClass *string `json:"instanceClass,omitempty" tf:"instance_class,omitempty"` + + // The amount of provisioned IOPS. Setting this implies a + // storage_type of "io1". Can only be set when storage_type is "io1" or "gp3". + // Cannot be specified for gp3 storage if the allocated_storage value is below a per-engine threshold. + // See the RDS User Guide for details. + Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` + + // License model information for this DB instance. + LicenseModel *string `json:"licenseModel,omitempty" tf:"license_model,omitempty"` + + // The window to perform maintenance in. + // Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". See RDS + // Maintenance Window + // docs + // for more information. + MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + + // Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if password is provided. + ManageMasterUserPassword *bool `json:"manageMasterUserPassword,omitempty" tf:"manage_master_user_password,omitempty"` + + // When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Configuring this will automatically ignore differences to allocated_storage. Must be greater than or equal to allocated_storage or 0 to disable Storage Autoscaling. + MaxAllocatedStorage *float64 `json:"maxAllocatedStorage,omitempty" tf:"max_allocated_storage,omitempty"` + + // The interval, in seconds, between points + // when Enhanced Monitoring metrics are collected for the DB instance. To disable + // collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid + // Values: 0, 1, 5, 10, 15, 30, 60. + MonitoringInterval *float64 `json:"monitoringInterval,omitempty" tf:"monitoring_interval,omitempty"` + + // Specifies if the RDS instance is multi-AZ + MultiAz *bool `json:"multiAz,omitempty" tf:"multi_az,omitempty"` + + // The national character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed. See Oracle Character Sets + // Supported in Amazon RDS. + NcharCharacterSetName *string `json:"ncharCharacterSetName,omitempty" tf:"nchar_character_set_name,omitempty"` + + // The network type of the DB instance. Valid values: IPV4, DUAL. + NetworkType *string `json:"networkType,omitempty" tf:"network_type,omitempty"` + + // Name of the DB option group to associate. + OptionGroupName *string `json:"optionGroupName,omitempty" tf:"option_group_name,omitempty"` + + // Name of the DB parameter group to + // associate. + ParameterGroupName *string `json:"parameterGroupName,omitempty" tf:"parameter_group_name,omitempty"` + + // Specifies whether Performance Insights are enabled. Defaults to false. + PerformanceInsightsEnabled *bool `json:"performanceInsightsEnabled,omitempty" tf:"performance_insights_enabled,omitempty"` + + // The ARN for the KMS key to encrypt Performance Insights data. When specifying performance_insights_kms_key_id, performance_insights_enabled needs to be set to true. Once KMS key is set, it can never be changed. + PerformanceInsightsKMSKeyID *string `json:"performanceInsightsKmsKeyId,omitempty" tf:"performance_insights_kms_key_id,omitempty"` + + // Amount of time in days to retain Performance Insights data. Valid values are 7, 731 (2 years) or a multiple of 31. When specifying performance_insights_retention_period, performance_insights_enabled needs to be set to true. Defaults to '7'. + PerformanceInsightsRetentionPeriod *float64 `json:"performanceInsightsRetentionPeriod,omitempty" tf:"performance_insights_retention_period,omitempty"` + + // The port on which the DB accepts connections. + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // Bool to control if instance is publicly + // accessible. Default is false. + PubliclyAccessible *bool `json:"publiclyAccessible,omitempty" tf:"publicly_accessible,omitempty"` + + // Specifies whether the replica is in either mounted or open-read-only mode. This attribute + // is only supported by Oracle instances. Oracle replicas operate in open-read-only mode unless otherwise specified. See Working with Oracle Read Replicas for more information. + ReplicaMode *string `json:"replicaMode,omitempty" tf:"replica_mode,omitempty"` + + // A configuration block for restoring a DB instance to an arbitrary point in time. Requires the identifier argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details. + RestoreToPointInTime []RestoreToPointInTimeInitParameters `json:"restoreToPointInTime,omitempty" tf:"restore_to_point_in_time,omitempty"` + + // Restore from a Percona Xtrabackup in S3. See Importing Data into an Amazon RDS MySQL DB Instance + S3Import []S3ImportInitParameters `json:"s3Import,omitempty" tf:"s3_import,omitempty"` + + // Determines whether a final DB snapshot is + // created before the DB instance is deleted. If true is specified, no DBSnapshot + // is created. If false is specified, a DB snapshot is created before the DB + // instance is deleted, using the value from final_snapshot_identifier. Default + // is false. + SkipFinalSnapshot *bool `json:"skipFinalSnapshot,omitempty" tf:"skip_final_snapshot,omitempty"` + + // Specifies whether or not to create this + // database from a snapshot. This correlates to the snapshot ID you'd find in the + // RDS console, e.g: rds:production-2015-06-26-06-05. + SnapshotIdentifier *string `json:"snapshotIdentifier,omitempty" tf:"snapshot_identifier,omitempty"` + + // Specifies whether the DB instance is + // encrypted. Note that if you are creating a cross-region read replica this field + // is ignored and you should instead declare kms_key_id with a valid ARN. The + // default is false if not specified. + StorageEncrypted *bool `json:"storageEncrypted,omitempty" tf:"storage_encrypted,omitempty"` + + // The storage throughput value for the DB instance. Can only be set when storage_type is "gp3". Cannot be specified if the allocated_storage value is below a per-engine threshold. See the RDS User Guide for details. + StorageThroughput *float64 `json:"storageThroughput,omitempty" tf:"storage_throughput,omitempty"` + + // One of "standard" (magnetic), "gp2" (general + // purpose SSD), "gp3" (general purpose SSD that needs iops independently) + // or "io1" (provisioned IOPS SSD). The default is "io1" if iops is specified, + // "gp2" if not. + StorageType *string `json:"storageType,omitempty" tf:"storage_type,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Time zone of the DB instance. timezone is currently + // only supported by Microsoft SQL Server. The timezone can only be set on + // creation. See MSSQL User + // Guide + // for more information. + Timezone *string `json:"timezone,omitempty" tf:"timezone,omitempty"` + + // Username for the master DB user. Cannot be specified for a replica. + Username *string `json:"username,omitempty" tf:"username,omitempty"` +} + type InstanceObservation struct { // The hostname of the RDS instance. See also endpoint and port. @@ -122,10 +342,10 @@ type InstanceObservation struct { // The connection endpoint in address:port format. Endpoint *string `json:"endpoint,omitempty" tf:"endpoint,omitempty"` - // The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). + // The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` - // The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine version'. + // The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'. EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` // The running version of the database. @@ -432,11 +652,11 @@ type InstanceParameters struct { // +kubebuilder:validation:Optional EnabledCloudwatchLogsExports []*string `json:"enabledCloudwatchLogsExports,omitempty" tf:"enabled_cloudwatch_logs_exports,omitempty"` - // The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). + // The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). // +kubebuilder:validation:Optional Engine *string `json:"engine,omitempty" tf:"engine,omitempty"` - // The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine version'. + // The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'. // +kubebuilder:validation:Optional EngineVersion *string `json:"engineVersion,omitempty" tf:"engine_version,omitempty"` @@ -465,7 +685,7 @@ type InstanceParameters struct { // The ARN for the KMS encryption key. If creating an // encrypted replica, set this to the destination KMS ARN. // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key - // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` @@ -494,9 +714,19 @@ type InstanceParameters struct { ManageMasterUserPassword *bool `json:"manageMasterUserPassword,omitempty" tf:"manage_master_user_password,omitempty"` // The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("key_id",true) // +kubebuilder:validation:Optional MasterUserSecretKMSKeyID *string `json:"masterUserSecretKmsKeyId,omitempty" tf:"master_user_secret_kms_key_id,omitempty"` + // Reference to a Key in kms to populate masterUserSecretKmsKeyId. + // +kubebuilder:validation:Optional + MasterUserSecretKMSKeyIDRef *v1.Reference `json:"masterUserSecretKmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate masterUserSecretKmsKeyId. + // +kubebuilder:validation:Optional + MasterUserSecretKMSKeyIDSelector *v1.Selector `json:"masterUserSecretKmsKeyIdSelector,omitempty" tf:"-"` + // When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Configuring this will automatically ignore differences to allocated_storage. Must be greater than or equal to allocated_storage or 0 to disable Storage Autoscaling. // +kubebuilder:validation:Optional MaxAllocatedStorage *float64 `json:"maxAllocatedStorage,omitempty" tf:"max_allocated_storage,omitempty"` @@ -513,9 +743,19 @@ type InstanceParameters struct { // information on the AWS // Documentation // what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional MonitoringRoleArn *string `json:"monitoringRoleArn,omitempty" tf:"monitoring_role_arn,omitempty"` + // Reference to a Role in iam to populate monitoringRoleArn. + // +kubebuilder:validation:Optional + MonitoringRoleArnRef *v1.Reference `json:"monitoringRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate monitoringRoleArn. + // +kubebuilder:validation:Optional + MonitoringRoleArnSelector *v1.Selector `json:"monitoringRoleArnSelector,omitempty" tf:"-"` + // Specifies if the RDS instance is multi-AZ // +kubebuilder:validation:Optional MultiAz *bool `json:"multiAz,omitempty" tf:"multi_az,omitempty"` @@ -584,9 +824,18 @@ type InstanceParameters struct { // specify a kms_key_id. See DB Instance Replication and Working with // PostgreSQL and MySQL Read Replicas // for more information on using Replication. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Instance // +kubebuilder:validation:Optional ReplicateSourceDB *string `json:"replicateSourceDb,omitempty" tf:"replicate_source_db,omitempty"` + // Reference to a Instance in rds to populate replicateSourceDb. + // +kubebuilder:validation:Optional + ReplicateSourceDBRef *v1.Reference `json:"replicateSourceDbRef,omitempty" tf:"-"` + + // Selector for a Instance in rds to populate replicateSourceDb. + // +kubebuilder:validation:Optional + ReplicateSourceDBSelector *v1.Selector `json:"replicateSourceDbSelector,omitempty" tf:"-"` + // A configuration block for restoring a DB instance to an arbitrary point in time. Requires the identifier argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details. // +kubebuilder:validation:Optional RestoreToPointInTime []RestoreToPointInTimeParameters `json:"restoreToPointInTime,omitempty" tf:"restore_to_point_in_time,omitempty"` @@ -647,12 +896,26 @@ type InstanceParameters struct { // +kubebuilder:validation:Optional Username *string `json:"username,omitempty" tf:"username,omitempty"` + // References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"` + // List of VPC security groups to // associate. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector // +kubebuilder:validation:Optional VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"` } +type ListenerEndpointInitParameters struct { +} + type ListenerEndpointObservation struct { // The hostname of the RDS instance. See also endpoint and port. @@ -669,6 +932,9 @@ type ListenerEndpointObservation struct { type ListenerEndpointParameters struct { } +type MasterUserSecretInitParameters struct { +} + type MasterUserSecretObservation struct { // The Amazon Web Services KMS key identifier that is used to encrypt the secret. @@ -684,6 +950,24 @@ type MasterUserSecretObservation struct { type MasterUserSecretParameters struct { } +type RestoreToPointInTimeInitParameters struct { + + // The date and time to restore from. Value must be a time in Universal Coordinated Time (UTC) format and must be before the latest restorable time for the DB instance. Cannot be specified with use_latest_restorable_time. + RestoreTime *string `json:"restoreTime,omitempty" tf:"restore_time,omitempty"` + + // The ARN of the automated backup from which to restore. Required if source_db_instance_identifier or source_dbi_resource_id is not specified. + SourceDBInstanceAutomatedBackupsArn *string `json:"sourceDbInstanceAutomatedBackupsArn,omitempty" tf:"source_db_instance_automated_backups_arn,omitempty"` + + // The identifier of the source DB instance from which to restore. Must match the identifier of an existing DB instance. Required if source_db_instance_automated_backups_arn or source_dbi_resource_id is not specified. + SourceDBInstanceIdentifier *string `json:"sourceDbInstanceIdentifier,omitempty" tf:"source_db_instance_identifier,omitempty"` + + // The resource ID of the source DB instance from which to restore. Required if source_db_instance_identifier or source_db_instance_automated_backups_arn is not specified. + SourceDbiResourceID *string `json:"sourceDbiResourceId,omitempty" tf:"source_dbi_resource_id,omitempty"` + + // A boolean value that indicates whether the DB instance is restored from the latest backup time. Defaults to false. Cannot be specified with restore_time. + UseLatestRestorableTime *bool `json:"useLatestRestorableTime,omitempty" tf:"use_latest_restorable_time,omitempty"` +} + type RestoreToPointInTimeObservation struct { // The date and time to restore from. Value must be a time in Universal Coordinated Time (UTC) format and must be before the latest restorable time for the DB instance. Cannot be specified with use_latest_restorable_time. @@ -725,6 +1009,24 @@ type RestoreToPointInTimeParameters struct { UseLatestRestorableTime *bool `json:"useLatestRestorableTime,omitempty" tf:"use_latest_restorable_time,omitempty"` } +type S3ImportInitParameters struct { + + // The bucket name where your backup is stored + BucketName *string `json:"bucketName,omitempty" tf:"bucket_name,omitempty"` + + // Can be blank, but is the path to your backup + BucketPrefix *string `json:"bucketPrefix,omitempty" tf:"bucket_prefix,omitempty"` + + // Role applied to load the data. + IngestionRole *string `json:"ingestionRole,omitempty" tf:"ingestion_role,omitempty"` + + // Source engine for the backup + SourceEngine *string `json:"sourceEngine,omitempty" tf:"source_engine,omitempty"` + + // Version of the source engine used to make the backup + SourceEngineVersion *string `json:"sourceEngineVersion,omitempty" tf:"source_engine_version,omitempty"` +} + type S3ImportObservation struct { // The bucket name where your backup is stored @@ -746,7 +1048,7 @@ type S3ImportObservation struct { type S3ImportParameters struct { // The bucket name where your backup is stored - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional BucketName *string `json:"bucketName" tf:"bucket_name,omitempty"` // Can be blank, but is the path to your backup @@ -754,15 +1056,15 @@ type S3ImportParameters struct { BucketPrefix *string `json:"bucketPrefix,omitempty" tf:"bucket_prefix,omitempty"` // Role applied to load the data. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional IngestionRole *string `json:"ingestionRole" tf:"ingestion_role,omitempty"` // Source engine for the backup - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional SourceEngine *string `json:"sourceEngine" tf:"source_engine,omitempty"` // Version of the source engine used to make the backup - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional SourceEngineVersion *string `json:"sourceEngineVersion" tf:"source_engine_version,omitempty"` } @@ -770,6 +1072,17 @@ type S3ImportParameters struct { type InstanceSpec struct { v1.ResourceSpec `json:",inline"` 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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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"` } // InstanceStatus defines the observed state of Instance. @@ -790,8 +1103,8 @@ type InstanceStatus struct { type Instance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass)",message="instanceClass is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceClass) || (has(self.initProvider) && has(self.initProvider.instanceClass))",message="spec.forProvider.instanceClass is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec InstanceSpec `json:"spec"` Status InstanceStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_instanceroleassociation_types.go b/apis/rds/v1alpha1/zz_instanceroleassociation_types.go index d30d32c..9ebe642 100755 --- a/apis/rds/v1alpha1/zz_instanceroleassociation_types.go +++ b/apis/rds/v1alpha1/zz_instanceroleassociation_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type InstanceRoleAssociationInitParameters struct { + + // Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions. + FeatureName *string `json:"featureName,omitempty" tf:"feature_name,omitempty"` +} + type InstanceRoleAssociationObservation struct { // DB Instance Identifier to associate with the IAM Role. @@ -31,9 +41,18 @@ type InstanceRoleAssociationObservation struct { type InstanceRoleAssociationParameters struct { // DB Instance Identifier to associate with the IAM Role. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Instance // +kubebuilder:validation:Optional DBInstanceIdentifier *string `json:"dbInstanceIdentifier,omitempty" tf:"db_instance_identifier,omitempty"` + // Reference to a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierRef *v1.Reference `json:"dbInstanceIdentifierRef,omitempty" tf:"-"` + + // Selector for a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierSelector *v1.Selector `json:"dbInstanceIdentifierSelector,omitempty" tf:"-"` + // Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions. // +kubebuilder:validation:Optional FeatureName *string `json:"featureName,omitempty" tf:"feature_name,omitempty"` @@ -44,14 +63,35 @@ type InstanceRoleAssociationParameters struct { Region *string `json:"region,omitempty" tf:"-"` // Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional RoleArn *string `json:"roleArn,omitempty" tf:"role_arn,omitempty"` + + // Reference to a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnRef *v1.Reference `json:"roleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnSelector *v1.Selector `json:"roleArnSelector,omitempty" tf:"-"` } // InstanceRoleAssociationSpec defines the desired state of InstanceRoleAssociation type InstanceRoleAssociationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider InstanceRoleAssociationParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 InstanceRoleAssociationInitParameters `json:"initProvider,omitempty"` } // InstanceRoleAssociationStatus defines the observed state of InstanceRoleAssociation. @@ -72,10 +112,8 @@ type InstanceRoleAssociationStatus struct { type InstanceRoleAssociation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbInstanceIdentifier)",message="dbInstanceIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.featureName)",message="featureName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn)",message="roleArn is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.featureName) || (has(self.initProvider) && has(self.initProvider.featureName))",message="spec.forProvider.featureName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec InstanceRoleAssociationSpec `json:"spec"` Status InstanceRoleAssociationStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_optiongroup_types.go b/apis/rds/v1alpha1/zz_optiongroup_types.go index 24b7b3c..956b44d 100755 --- a/apis/rds/v1alpha1/zz_optiongroup_types.go +++ b/apis/rds/v1alpha1/zz_optiongroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,27 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type OptionGroupInitParameters struct { + + // Specifies the name of the engine that this option group should be associated with. + EngineName *string `json:"engineName,omitempty" tf:"engine_name,omitempty"` + + // Specifies the major version of the engine that this option group should be associated with. + MajorEngineVersion *string `json:"majorEngineVersion,omitempty" tf:"major_engine_version,omitempty"` + + // A list of Options to apply. + Option []OptionInitParameters `json:"option,omitempty" tf:"option,omitempty"` + + // The description of the option group. + OptionGroupDescription *string `json:"optionGroupDescription,omitempty" tf:"option_group_description,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type OptionGroupObservation struct { // The ARN of the db option group. @@ -72,6 +97,27 @@ type OptionGroupParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type OptionInitParameters struct { + + // A list of DB Security Groups for which the option is enabled. + DBSecurityGroupMemberships []*string `json:"dbSecurityGroupMemberships,omitempty" tf:"db_security_group_memberships,omitempty"` + + // The Name of the Option (e.g., MEMCACHED). + OptionName *string `json:"optionName,omitempty" tf:"option_name,omitempty"` + + // A list of option settings to apply. + OptionSettings []OptionSettingsInitParameters `json:"optionSettings,omitempty" tf:"option_settings,omitempty"` + + // The Port number when connecting to the Option (e.g., 11211). + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // A list of VPC Security Groups for which the option is enabled. + VPCSecurityGroupMemberships []*string `json:"vpcSecurityGroupMemberships,omitempty" tf:"vpc_security_group_memberships,omitempty"` + + // The version of the option (e.g., 13.1.0.0). + Version *string `json:"version,omitempty" tf:"version,omitempty"` +} + type OptionObservation struct { // A list of DB Security Groups for which the option is enabled. @@ -100,7 +146,7 @@ type OptionParameters struct { DBSecurityGroupMemberships []*string `json:"dbSecurityGroupMemberships,omitempty" tf:"db_security_group_memberships,omitempty"` // The Name of the Option (e.g., MEMCACHED). - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional OptionName *string `json:"optionName" tf:"option_name,omitempty"` // A list of option settings to apply. @@ -120,6 +166,15 @@ type OptionParameters struct { Version *string `json:"version,omitempty" tf:"version,omitempty"` } +type OptionSettingsInitParameters struct { + + // The name of the option group. Must be lowercase, to match as it is stored in AWS. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The Value of the setting. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type OptionSettingsObservation struct { // The name of the option group. Must be lowercase, to match as it is stored in AWS. @@ -132,11 +187,11 @@ type OptionSettingsObservation struct { type OptionSettingsParameters struct { // The name of the option group. Must be lowercase, to match as it is stored in AWS. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The Value of the setting. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -144,6 +199,17 @@ type OptionSettingsParameters struct { type OptionGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider OptionGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 OptionGroupInitParameters `json:"initProvider,omitempty"` } // OptionGroupStatus defines the observed state of OptionGroup. @@ -164,9 +230,9 @@ type OptionGroupStatus struct { type OptionGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engineName)",message="engineName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.majorEngineVersion)",message="majorEngineVersion is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engineName) || (has(self.initProvider) && has(self.initProvider.engineName))",message="spec.forProvider.engineName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.majorEngineVersion) || (has(self.initProvider) && has(self.initProvider.majorEngineVersion))",message="spec.forProvider.majorEngineVersion is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec OptionGroupSpec `json:"spec"` Status OptionGroupStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_parametergroup_types.go b/apis/rds/v1alpha1/zz_parametergroup_types.go index b57d922..bba6e14 100755 --- a/apis/rds/v1alpha1/zz_parametergroup_types.go +++ b/apis/rds/v1alpha1/zz_parametergroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ParameterGroupInitParameters struct { + + // The description of the DB parameter group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The family of the DB parameter group. + Family *string `json:"family,omitempty" tf:"family,omitempty"` + + // A list of DB parameters to apply. Note that parameters may differ from a family to an other. Full list of all parameters can be discovered via aws rds describe-db-parameters after initial creation of the group. + Parameter []ParameterInitParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type ParameterGroupObservation struct { // The ARN of the db parameter group. @@ -65,6 +87,20 @@ type ParameterGroupParameters struct { TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` } +type ParameterInitParameters struct { + + // "immediate" (default), or "pending-reboot". Some + // engines can't apply some parameters without a reboot, and you will need to + // specify "pending-reboot" here. + ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` + + // The name of the DB parameter group. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The value of the DB parameter. + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + type ParameterObservation struct { // "immediate" (default), or "pending-reboot". Some @@ -88,11 +124,11 @@ type ParameterParameters struct { ApplyMethod *string `json:"applyMethod,omitempty" tf:"apply_method,omitempty"` // The name of the DB parameter group. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Name *string `json:"name" tf:"name,omitempty"` // The value of the DB parameter. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Value *string `json:"value" tf:"value,omitempty"` } @@ -100,6 +136,17 @@ type ParameterParameters struct { type ParameterGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ParameterGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ParameterGroupInitParameters `json:"initProvider,omitempty"` } // ParameterGroupStatus defines the observed state of ParameterGroup. @@ -120,8 +167,8 @@ type ParameterGroupStatus struct { type ParameterGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family)",message="family is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ParameterGroupSpec `json:"spec"` Status ParameterGroupStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_proxy_types.go b/apis/rds/v1alpha1/zz_proxy_types.go index 8c09e00..e1e6927 100755 --- a/apis/rds/v1alpha1/zz_proxy_types.go +++ b/apis/rds/v1alpha1/zz_proxy_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AuthInitParameters struct { + + // The type of authentication that the proxy uses for connections from the proxy to the underlying database. One of SECRETS. + AuthScheme *string `json:"authScheme,omitempty" tf:"auth_scheme,omitempty"` + + // The type of authentication the proxy uses for connections from clients. Valid values are MYSQL_NATIVE_PASSWORD, POSTGRES_SCRAM_SHA_256, POSTGRES_MD5, and SQL_SERVER_AUTHENTICATION. + ClientPasswordAuthType *string `json:"clientPasswordAuthType,omitempty" tf:"client_password_auth_type,omitempty"` + + // A user-specified description about the authentication used by a proxy to log in as a specific database user. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Whether to require or disallow AWS Identity and Access Management (IAM) authentication for connections to the proxy. One of DISABLED, REQUIRED. + IAMAuth *string `json:"iamAuth,omitempty" tf:"iam_auth,omitempty"` + + // The name of the database user to which the proxy connects. + Username *string `json:"username,omitempty" tf:"username,omitempty"` +} + type AuthObservation struct { // The type of authentication that the proxy uses for connections from the proxy to the underlying database. One of SECRETS. @@ -53,14 +75,51 @@ type AuthParameters struct { IAMAuth *string `json:"iamAuth,omitempty" tf:"iam_auth,omitempty"` // The Amazon Resource Name (ARN) representing the secret that the proxy uses to authenticate to the RDS DB instance or Aurora DB cluster. These secrets are stored within Amazon Secrets Manager. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/secretsmanager/v1alpha1.Secret + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) // +kubebuilder:validation:Optional SecretArn *string `json:"secretArn,omitempty" tf:"secret_arn,omitempty"` + // Reference to a Secret in secretsmanager to populate secretArn. + // +kubebuilder:validation:Optional + SecretArnRef *v1.Reference `json:"secretArnRef,omitempty" tf:"-"` + + // Selector for a Secret in secretsmanager to populate secretArn. + // +kubebuilder:validation:Optional + SecretArnSelector *v1.Selector `json:"secretArnSelector,omitempty" tf:"-"` + // The name of the database user to which the proxy connects. // +kubebuilder:validation:Optional Username *string `json:"username,omitempty" tf:"username,omitempty"` } +type ProxyInitParameters struct { + + // Configuration block(s) with authorization mechanisms to connect to the associated instances or clusters. Described below. + Auth []AuthInitParameters `json:"auth,omitempty" tf:"auth,omitempty"` + + // Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs. + DebugLogging *bool `json:"debugLogging,omitempty" tf:"debug_logging,omitempty"` + + // The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. The engine family applies to MySQL and PostgreSQL for both RDS and Aurora. Valid values are MYSQL and POSTGRESQL. + EngineFamily *string `json:"engineFamily,omitempty" tf:"engine_family,omitempty"` + + // The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. + IdleClientTimeout *float64 `json:"idleClientTimeout,omitempty" tf:"idle_client_timeout,omitempty"` + + // A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy. + RequireTLS *bool `json:"requireTls,omitempty" tf:"require_tls,omitempty"` + + // A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // One or more VPC subnet IDs to associate with the new proxy. + VPCSubnetIds []*string `json:"vpcSubnetIds,omitempty" tf:"vpc_subnet_ids,omitempty"` +} + type ProxyObservation struct { // The Amazon Resource Name (ARN) for the proxy. @@ -131,9 +190,19 @@ type ProxyParameters struct { RequireTLS *bool `json:"requireTls,omitempty" tf:"require_tls,omitempty"` // The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional RoleArn *string `json:"roleArn,omitempty" tf:"role_arn,omitempty"` + // Reference to a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnRef *v1.Reference `json:"roleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate roleArn. + // +kubebuilder:validation:Optional + RoleArnSelector *v1.Selector `json:"roleArnSelector,omitempty" tf:"-"` + // A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. // +kubebuilder:validation:Optional Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` @@ -142,7 +211,18 @@ type ProxyParameters struct { // +kubebuilder:validation:Optional TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + // References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"` + // One or more VPC security group IDs to associate with the new proxy. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector // +kubebuilder:validation:Optional VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"` @@ -155,6 +235,17 @@ type ProxyParameters struct { type ProxySpec struct { v1.ResourceSpec `json:",inline"` ForProvider ProxyParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ProxyInitParameters `json:"initProvider,omitempty"` } // ProxyStatus defines the observed state of Proxy. @@ -175,11 +266,10 @@ type ProxyStatus struct { type Proxy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.auth)",message="auth is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engineFamily)",message="engineFamily is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn)",message="roleArn is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcSubnetIds)",message="vpcSubnetIds is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.auth) || (has(self.initProvider) && has(self.initProvider.auth))",message="spec.forProvider.auth is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.engineFamily) || (has(self.initProvider) && has(self.initProvider.engineFamily))",message="spec.forProvider.engineFamily is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.vpcSubnetIds) || (has(self.initProvider) && has(self.initProvider.vpcSubnetIds))",message="spec.forProvider.vpcSubnetIds is a required parameter" Spec ProxySpec `json:"spec"` Status ProxyStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_proxydefaulttargetgroup_types.go b/apis/rds/v1alpha1/zz_proxydefaulttargetgroup_types.go index 66bbf64..4bf2937 100755 --- a/apis/rds/v1alpha1/zz_proxydefaulttargetgroup_types.go +++ b/apis/rds/v1alpha1/zz_proxydefaulttargetgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,24 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ConnectionPoolConfigInitParameters struct { + + // The number of seconds for a proxy to wait for a connection to become available in the connection pool. Only applies when the proxy has opened its maximum number of connections and all connections are busy with client sessions. + ConnectionBorrowTimeout *float64 `json:"connectionBorrowTimeout,omitempty" tf:"connection_borrow_timeout,omitempty"` + + // One or more SQL statements for the proxy to run when opening each new database connection. Typically used with SET statements to make sure that each connection has identical settings such as time zone and character set. This setting is empty by default. For multiple statements, use semicolons as the separator. You can also include multiple variables in a single SET statement, such as SET x=1, y=2. + InitQuery *string `json:"initQuery,omitempty" tf:"init_query,omitempty"` + + // The maximum size of the connection pool for each target in a target group. For Aurora MySQL, it is expressed as a percentage of the max_connections setting for the RDS DB instance or Aurora DB cluster used by the target group. + MaxConnectionsPercent *float64 `json:"maxConnectionsPercent,omitempty" tf:"max_connections_percent,omitempty"` + + // Controls how actively the proxy closes idle database connections in the connection pool. A high value enables the proxy to leave a high percentage of idle connections open. A low value causes the proxy to close idle client connections and return the underlying database connections to the connection pool. For Aurora MySQL, it is expressed as a percentage of the max_connections setting for the RDS DB instance or Aurora DB cluster used by the target group. + MaxIdleConnectionsPercent *float64 `json:"maxIdleConnectionsPercent,omitempty" tf:"max_idle_connections_percent,omitempty"` + + // Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection. Including an item in the list exempts that class of SQL operations from the pinning behavior. Currently, the only allowed value is EXCLUDE_VARIABLE_SETS. + SessionPinningFilters []*string `json:"sessionPinningFilters,omitempty" tf:"session_pinning_filters,omitempty"` +} + type ConnectionPoolConfigObservation struct { // The number of seconds for a proxy to wait for a connection to become available in the connection pool. Only applies when the proxy has opened its maximum number of connections and all connections are busy with client sessions. @@ -54,6 +76,12 @@ type ConnectionPoolConfigParameters struct { SessionPinningFilters []*string `json:"sessionPinningFilters,omitempty" tf:"session_pinning_filters,omitempty"` } +type ProxyDefaultTargetGroupInitParameters struct { + + // The settings that determine the size and behavior of the connection pool for the target group. + ConnectionPoolConfig []ConnectionPoolConfigInitParameters `json:"connectionPoolConfig,omitempty" tf:"connection_pool_config,omitempty"` +} + type ProxyDefaultTargetGroupObservation struct { // The Amazon Resource Name (ARN) representing the target group. @@ -79,9 +107,18 @@ type ProxyDefaultTargetGroupParameters struct { ConnectionPoolConfig []ConnectionPoolConfigParameters `json:"connectionPoolConfig,omitempty" tf:"connection_pool_config,omitempty"` // Name of the RDS DB Proxy. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Proxy // +kubebuilder:validation:Optional DBProxyName *string `json:"dbProxyName,omitempty" tf:"db_proxy_name,omitempty"` + // Reference to a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameRef *v1.Reference `json:"dbProxyNameRef,omitempty" tf:"-"` + + // Selector for a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameSelector *v1.Selector `json:"dbProxyNameSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -92,6 +129,17 @@ type ProxyDefaultTargetGroupParameters struct { type ProxyDefaultTargetGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ProxyDefaultTargetGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ProxyDefaultTargetGroupInitParameters `json:"initProvider,omitempty"` } // ProxyDefaultTargetGroupStatus defines the observed state of ProxyDefaultTargetGroup. @@ -112,8 +160,7 @@ type ProxyDefaultTargetGroupStatus struct { type ProxyDefaultTargetGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbProxyName)",message="dbProxyName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec ProxyDefaultTargetGroupSpec `json:"spec"` Status ProxyDefaultTargetGroupStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_proxyendpoint_types.go b/apis/rds/v1alpha1/zz_proxyendpoint_types.go index 240a60c..45f47ec 100755 --- a/apis/rds/v1alpha1/zz_proxyendpoint_types.go +++ b/apis/rds/v1alpha1/zz_proxyendpoint_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,20 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ProxyEndpointInitParameters struct { + + // A mapping of tags to assign to the resource. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is READ_WRITE. Valid values are READ_WRITE and READ_ONLY. + TargetRole *string `json:"targetRole,omitempty" tf:"target_role,omitempty"` + + // One or more VPC subnet IDs to associate with the new proxy. + VPCSubnetIds []*string `json:"vpcSubnetIds,omitempty" tf:"vpc_subnet_ids,omitempty"` +} + type ProxyEndpointObservation struct { // The Amazon Resource Name (ARN) for the proxy endpoint. @@ -51,8 +69,17 @@ type ProxyEndpointObservation struct { type ProxyEndpointParameters struct { // The name of the DB proxy associated with the DB proxy endpoint that you create. - // +kubebuilder:validation:Required - DBProxyName *string `json:"dbProxyName" tf:"db_proxy_name,omitempty"` + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Proxy + // +kubebuilder:validation:Optional + DBProxyName *string `json:"dbProxyName,omitempty" tf:"db_proxy_name,omitempty"` + + // Reference to a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameRef *v1.Reference `json:"dbProxyNameRef,omitempty" tf:"-"` + + // Selector for a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameSelector *v1.Selector `json:"dbProxyNameSelector,omitempty" tf:"-"` // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- @@ -70,7 +97,18 @@ type ProxyEndpointParameters struct { // +kubebuilder:validation:Optional TargetRole *string `json:"targetRole,omitempty" tf:"target_role,omitempty"` + // References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds. + // +kubebuilder:validation:Optional + VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"` + // One or more VPC security group IDs to associate with the new proxy. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup + // +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector // +kubebuilder:validation:Optional VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"` @@ -83,6 +121,17 @@ type ProxyEndpointParameters struct { type ProxyEndpointSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ProxyEndpointParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ProxyEndpointInitParameters `json:"initProvider,omitempty"` } // ProxyEndpointStatus defines the observed state of ProxyEndpoint. @@ -103,8 +152,8 @@ type ProxyEndpointStatus struct { type ProxyEndpoint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcSubnetIds)",message="vpcSubnetIds is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.vpcSubnetIds) || (has(self.initProvider) && has(self.initProvider.vpcSubnetIds))",message="spec.forProvider.vpcSubnetIds is a required parameter" Spec ProxyEndpointSpec `json:"spec"` Status ProxyEndpointStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_proxytarget_types.go b/apis/rds/v1alpha1/zz_proxytarget_types.go index 0a067e2..f0e2488 100755 --- a/apis/rds/v1alpha1/zz_proxytarget_types.go +++ b/apis/rds/v1alpha1/zz_proxytarget_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,15 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ProxyTargetInitParameters struct { + + // DB cluster identifier. + DBClusterIdentifier *string `json:"dbClusterIdentifier,omitempty" tf:"db_cluster_identifier,omitempty"` + + // The name of the target group. + TargetGroupName *string `json:"targetGroupName,omitempty" tf:"target_group_name,omitempty"` +} + type ProxyTargetObservation struct { // DB cluster identifier. @@ -56,13 +69,31 @@ type ProxyTargetParameters struct { DBClusterIdentifier *string `json:"dbClusterIdentifier,omitempty" tf:"db_cluster_identifier,omitempty"` // DB instance identifier. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Instance // +kubebuilder:validation:Optional DBInstanceIdentifier *string `json:"dbInstanceIdentifier,omitempty" tf:"db_instance_identifier,omitempty"` + // Reference to a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierRef *v1.Reference `json:"dbInstanceIdentifierRef,omitempty" tf:"-"` + + // Selector for a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierSelector *v1.Selector `json:"dbInstanceIdentifierSelector,omitempty" tf:"-"` + // The name of the DB proxy. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Proxy // +kubebuilder:validation:Optional DBProxyName *string `json:"dbProxyName,omitempty" tf:"db_proxy_name,omitempty"` + // Reference to a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameRef *v1.Reference `json:"dbProxyNameRef,omitempty" tf:"-"` + + // Selector for a Proxy in rds to populate dbProxyName. + // +kubebuilder:validation:Optional + DBProxyNameSelector *v1.Selector `json:"dbProxyNameSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -77,6 +108,17 @@ type ProxyTargetParameters struct { type ProxyTargetSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ProxyTargetParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 ProxyTargetInitParameters `json:"initProvider,omitempty"` } // ProxyTargetStatus defines the observed state of ProxyTarget. @@ -97,9 +139,8 @@ type ProxyTargetStatus struct { type ProxyTarget struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbProxyName)",message="dbProxyName is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.targetGroupName)",message="targetGroupName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.targetGroupName) || (has(self.initProvider) && has(self.initProvider.targetGroupName))",message="spec.forProvider.targetGroupName is a required parameter" Spec ProxyTargetSpec `json:"spec"` Status ProxyTargetStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_snapshot_types.go b/apis/rds/v1alpha1/zz_snapshot_types.go index bb580fe..8a977c8 100755 --- a/apis/rds/v1alpha1/zz_snapshot_types.go +++ b/apis/rds/v1alpha1/zz_snapshot_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SnapshotInitParameters struct { + + // List of AWS Account ids to share snapshot with, use all to make snaphot public. + SharedAccounts []*string `json:"sharedAccounts,omitempty" tf:"shared_accounts,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SnapshotObservation struct { // Specifies the allocated storage size in gigabytes (GB). @@ -82,9 +98,18 @@ type SnapshotObservation struct { type SnapshotParameters struct { // The DB Instance Identifier from which to take the snapshot. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/rds/v1alpha1.Instance // +kubebuilder:validation:Optional DBInstanceIdentifier *string `json:"dbInstanceIdentifier,omitempty" tf:"db_instance_identifier,omitempty"` + // Reference to a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierRef *v1.Reference `json:"dbInstanceIdentifierRef,omitempty" tf:"-"` + + // Selector for a Instance in rds to populate dbInstanceIdentifier. + // +kubebuilder:validation:Optional + DBInstanceIdentifierSelector *v1.Selector `json:"dbInstanceIdentifierSelector,omitempty" tf:"-"` + // Region is the region you'd like your resource to be created in. // +upjet:crd:field:TFTag=- // +kubebuilder:validation:Optional @@ -107,6 +132,17 @@ type SnapshotParameters struct { type SnapshotSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SnapshotParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SnapshotInitParameters `json:"initProvider,omitempty"` } // SnapshotStatus defines the observed state of Snapshot. @@ -127,8 +163,7 @@ type SnapshotStatus struct { type Snapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbInstanceIdentifier)",message="dbInstanceIdentifier is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SnapshotSpec `json:"spec"` Status SnapshotStatus `json:"status,omitempty"` } diff --git a/apis/rds/v1alpha1/zz_subnetgroup_types.go b/apis/rds/v1alpha1/zz_subnetgroup_types.go index 3316c2f..ed4a411 100755 --- a/apis/rds/v1alpha1/zz_subnetgroup_types.go +++ b/apis/rds/v1alpha1/zz_subnetgroup_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,18 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type SubnetGroupInitParameters struct { + + // The description of the DB subnet group. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + type SubnetGroupObservation struct { // The ARN of the db subnet group. @@ -51,7 +67,18 @@ type SubnetGroupParameters struct { // +kubebuilder:validation:Optional Region *string `json:"region,omitempty" tf:"-"` + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + // A list of VPC subnet IDs. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector // +kubebuilder:validation:Optional SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` @@ -68,6 +95,17 @@ type SubnetGroupParameters struct { type SubnetGroupSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SubnetGroupParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SubnetGroupInitParameters `json:"initProvider,omitempty"` } // SubnetGroupStatus defines the observed state of SubnetGroup. @@ -88,8 +126,7 @@ type SubnetGroupStatus struct { type SubnetGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter" - // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds)",message="subnetIds is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region)",message="spec.forProvider.region is a required parameter" Spec SubnetGroupSpec `json:"spec"` Status SubnetGroupStatus `json:"status,omitempty"` } diff --git a/apis/secretsmanager/v1alpha1/zz_generated.deepcopy.go b/apis/secretsmanager/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..c221d38 --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,475 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicaInitParameters) DeepCopyInto(out *ReplicaInitParameters) { + *out = *in + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaInitParameters. +func (in *ReplicaInitParameters) DeepCopy() *ReplicaInitParameters { + if in == nil { + return nil + } + out := new(ReplicaInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicaObservation) DeepCopyInto(out *ReplicaObservation) { + *out = *in + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.LastAccessedDate != nil { + in, out := &in.LastAccessedDate, &out.LastAccessedDate + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.StatusMessage != nil { + in, out := &in.StatusMessage, &out.StatusMessage + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaObservation. +func (in *ReplicaObservation) DeepCopy() *ReplicaObservation { + if in == nil { + return nil + } + out := new(ReplicaObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicaParameters) DeepCopyInto(out *ReplicaParameters) { + *out = *in + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaParameters. +func (in *ReplicaParameters) DeepCopy() *ReplicaParameters { + if in == nil { + return nil + } + out := new(ReplicaParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Secret) DeepCopyInto(out *Secret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret. +func (in *Secret) DeepCopy() *Secret { + if in == nil { + return nil + } + out := new(Secret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Secret) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretInitParameters) DeepCopyInto(out *SecretInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceOverwriteReplicaSecret != nil { + in, out := &in.ForceOverwriteReplicaSecret, &out.ForceOverwriteReplicaSecret + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.RecoveryWindowInDays != nil { + in, out := &in.RecoveryWindowInDays, &out.RecoveryWindowInDays + *out = new(float64) + **out = **in + } + if in.Replica != nil { + in, out := &in.Replica, &out.Replica + *out = make([]ReplicaInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretInitParameters. +func (in *SecretInitParameters) DeepCopy() *SecretInitParameters { + if in == nil { + return nil + } + out := new(SecretInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretList) DeepCopyInto(out *SecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Secret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList. +func (in *SecretList) DeepCopy() *SecretList { + if in == nil { + return nil + } + out := new(SecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecretList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretObservation) DeepCopyInto(out *SecretObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceOverwriteReplicaSecret != nil { + in, out := &in.ForceOverwriteReplicaSecret, &out.ForceOverwriteReplicaSecret + *out = new(bool) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.RecoveryWindowInDays != nil { + in, out := &in.RecoveryWindowInDays, &out.RecoveryWindowInDays + *out = new(float64) + **out = **in + } + if in.Replica != nil { + in, out := &in.Replica, &out.Replica + *out = make([]ReplicaObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretObservation. +func (in *SecretObservation) DeepCopy() *SecretObservation { + if in == nil { + return nil + } + out := new(SecretObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretParameters) DeepCopyInto(out *SecretParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ForceOverwriteReplicaSecret != nil { + in, out := &in.ForceOverwriteReplicaSecret, &out.ForceOverwriteReplicaSecret + *out = new(bool) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NamePrefix != nil { + in, out := &in.NamePrefix, &out.NamePrefix + *out = new(string) + **out = **in + } + if in.RecoveryWindowInDays != nil { + in, out := &in.RecoveryWindowInDays, &out.RecoveryWindowInDays + *out = new(float64) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Replica != nil { + in, out := &in.Replica, &out.Replica + *out = make([]ReplicaParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretParameters. +func (in *SecretParameters) DeepCopy() *SecretParameters { + if in == nil { + return nil + } + out := new(SecretParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretSpec) DeepCopyInto(out *SecretSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretSpec. +func (in *SecretSpec) DeepCopy() *SecretSpec { + if in == nil { + return nil + } + out := new(SecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretStatus) DeepCopyInto(out *SecretStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretStatus. +func (in *SecretStatus) DeepCopy() *SecretStatus { + if in == nil { + return nil + } + out := new(SecretStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/secretsmanager/v1alpha1/zz_generated.managed.go b/apis/secretsmanager/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..1c5b65e --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_generated.managed.go @@ -0,0 +1,68 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Secret. +func (mg *Secret) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Secret. +func (mg *Secret) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Secret. +func (mg *Secret) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Secret. +func (mg *Secret) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Secret. +func (mg *Secret) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Secret. +func (mg *Secret) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Secret. +func (mg *Secret) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Secret. +func (mg *Secret) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Secret. +func (mg *Secret) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Secret. +func (mg *Secret) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Secret. +func (mg *Secret) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Secret. +func (mg *Secret) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/secretsmanager/v1alpha1/zz_generated.managedlist.go b/apis/secretsmanager/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..0425ead --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,17 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this SecretList. +func (l *SecretList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/secretsmanager/v1alpha1/zz_generated.resolvers.go b/apis/secretsmanager/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..82a7f5c --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,40 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Secret. +func (mg *Secret) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.KMSKeyIDSelector, + To: reference.To{ + List: &v1alpha1.KeyList{}, + Managed: &v1alpha1.Key{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.KMSKeyID") + } + mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/secretsmanager/v1alpha1/zz_generated_terraformed.go b/apis/secretsmanager/v1alpha1/zz_generated_terraformed.go new file mode 100755 index 0000000..e7d20dc --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_generated_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Secret +func (mg *Secret) GetTerraformResourceType() string { + return "aws_secretsmanager_secret" +} + +// GetConnectionDetailsMapping for this Secret +func (tr *Secret) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Secret +func (tr *Secret) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Secret +func (tr *Secret) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Secret +func (tr *Secret) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Secret +func (tr *Secret) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Secret +func (tr *Secret) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Secret +func (tr *Secret) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Secret +func (tr *Secret) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Secret using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Secret) LateInitialize(attrs []byte) (bool, error) { + params := &SecretParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Secret) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/secretsmanager/v1alpha1/zz_groupversion_info.go b/apis/secretsmanager/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..44a3f43 --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=secretsmanager.aws.kubedb.com +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "secretsmanager.aws.kubedb.com" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/secretsmanager/v1alpha1/zz_secret_types.go b/apis/secretsmanager/v1alpha1/zz_secret_types.go new file mode 100755 index 0000000..193244b --- /dev/null +++ b/apis/secretsmanager/v1alpha1/zz_secret_types.go @@ -0,0 +1,237 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type ReplicaInitParameters struct { + + // ARN, Key ID, or Alias of the AWS KMS key within the region secret is replicated to. If one is not specified, then Secrets Manager defaults to using the AWS account's default KMS key (aws/secretsmanager) in the region or creates one for use if non-existent. + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Region for replicating the secret. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type ReplicaObservation struct { + + // ARN, Key ID, or Alias of the AWS KMS key within the region secret is replicated to. If one is not specified, then Secrets Manager defaults to using the AWS account's default KMS key (aws/secretsmanager) in the region or creates one for use if non-existent. + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Date that you last accessed the secret in the Region. + LastAccessedDate *string `json:"lastAccessedDate,omitempty" tf:"last_accessed_date,omitempty"` + + // Region for replicating the secret. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Status can be InProgress, Failed, or InSync. + Status *string `json:"status,omitempty" tf:"status,omitempty"` + + // Message such as Replication succeeded or Secret with this name already exists in this region. + StatusMessage *string `json:"statusMessage,omitempty" tf:"status_message,omitempty"` +} + +type ReplicaParameters struct { + + // ARN, Key ID, or Alias of the AWS KMS key within the region secret is replicated to. If one is not specified, then Secrets Manager defaults to using the AWS account's default KMS key (aws/secretsmanager) in the region or creates one for use if non-existent. + // +kubebuilder:validation:Optional + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Region for replicating the secret. + // +kubebuilder:validation:Optional + Region *string `json:"region" tf:"region,omitempty"` +} + +type SecretInitParameters struct { + + // Description of the secret. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Accepts boolean value to specify whether to overwrite a secret with the same name in the destination Region. + ForceOverwriteReplicaSecret *bool `json:"forceOverwriteReplicaSecret,omitempty" tf:"force_overwrite_replica_secret,omitempty"` + + // Friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: /_+=.@- Conflicts with name_prefix. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // Number of days that AWS Secrets Manager waits before it can delete the secret. This value can be 0 to force deletion without recovery or range from 7 to 30 days. The default value is 30. + RecoveryWindowInDays *float64 `json:"recoveryWindowInDays,omitempty" tf:"recovery_window_in_days,omitempty"` + + // Configuration block to support secret replication. See details below. + Replica []ReplicaInitParameters `json:"replica,omitempty" tf:"replica,omitempty"` + + // Key-value map of user-defined tags that are attached to the secret. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type SecretObservation struct { + + // ARN of the secret. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Description of the secret. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Accepts boolean value to specify whether to overwrite a secret with the same name in the destination Region. + ForceOverwriteReplicaSecret *bool `json:"forceOverwriteReplicaSecret,omitempty" tf:"force_overwrite_replica_secret,omitempty"` + + // ARN of the secret. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // ARN or Id of the AWS KMS key to be used to encrypt the secret values in the versions stored in this secret. If you need to reference a CMK in a different account, you can use only the key ARN. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default KMS key (the one named aws/secretsmanager). If the default KMS key with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time. + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: /_+=.@- Conflicts with name_prefix. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // Valid JSON document representing a resource policy. Removing policy from your configuration or setting policy to null or an empty string (i.e., policy = "") will not delete the policy since it could have been set by aws_secretsmanager_secret_policy. To delete the policy, set it to "{}" (an empty JSON document). + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // Number of days that AWS Secrets Manager waits before it can delete the secret. This value can be 0 to force deletion without recovery or range from 7 to 30 days. The default value is 30. + RecoveryWindowInDays *float64 `json:"recoveryWindowInDays,omitempty" tf:"recovery_window_in_days,omitempty"` + + // Configuration block to support secret replication. See details below. + Replica []ReplicaObservation `json:"replica,omitempty" tf:"replica,omitempty"` + + // Key-value map of user-defined tags that are attached to the secret. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type SecretParameters struct { + + // Description of the secret. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Accepts boolean value to specify whether to overwrite a secret with the same name in the destination Region. + // +kubebuilder:validation:Optional + ForceOverwriteReplicaSecret *bool `json:"forceOverwriteReplicaSecret,omitempty" tf:"force_overwrite_replica_secret,omitempty"` + + // ARN or Id of the AWS KMS key to be used to encrypt the secret values in the versions stored in this secret. If you need to reference a CMK in a different account, you can use only the key ARN. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default KMS key (the one named aws/secretsmanager). If the default KMS key with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time. + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/kms/v1alpha1.Key + // +kubebuilder:validation:Optional + KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` + + // Friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: /_+=.@- Conflicts with name_prefix. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Creates a unique name beginning with the specified prefix. Conflicts with name. + // +kubebuilder:validation:Optional + NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + + // Number of days that AWS Secrets Manager waits before it can delete the secret. This value can be 0 to force deletion without recovery or range from 7 to 30 days. The default value is 30. + // +kubebuilder:validation:Optional + RecoveryWindowInDays *float64 `json:"recoveryWindowInDays,omitempty" tf:"recovery_window_in_days,omitempty"` + + // Region for replicating the secret. + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // Configuration block to support secret replication. See details below. + // +kubebuilder:validation:Optional + Replica []ReplicaParameters `json:"replica,omitempty" tf:"replica,omitempty"` + + // Key-value map of user-defined tags that are attached to the secret. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +// SecretSpec defines the desired state of Secret +type SecretSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider SecretParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 SecretInitParameters `json:"initProvider,omitempty"` +} + +// SecretStatus defines the observed state of Secret. +type SecretStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider SecretObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Secret is the Schema for the Secrets API. Provides a resource to manage AWS Secrets Manager secret metadata +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type Secret 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.region)",message="spec.forProvider.region is a required parameter" + Spec SecretSpec `json:"spec"` + Status SecretStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SecretList contains a list of Secrets +type SecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Secret `json:"items"` +} + +// Repository type metadata. +var ( + Secret_Kind = "Secret" + Secret_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Secret_Kind}.String() + Secret_KindAPIVersion = Secret_Kind + "." + CRDGroupVersion.String() + Secret_GroupVersionKind = CRDGroupVersion.WithKind(Secret_Kind) +) + +func init() { + SchemeBuilder.Register(&Secret{}, &SecretList{}) +} diff --git a/apis/sns/v1alpha1/zz_generated.deepcopy.go b/apis/sns/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..9603bf1 --- /dev/null +++ b/apis/sns/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,664 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Topic) DeepCopyInto(out *Topic) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topic. +func (in *Topic) DeepCopy() *Topic { + if in == nil { + return nil + } + out := new(Topic) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Topic) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicInitParameters) DeepCopyInto(out *TopicInitParameters) { + *out = *in + if in.ApplicationSuccessFeedbackSampleRate != nil { + in, out := &in.ApplicationSuccessFeedbackSampleRate, &out.ApplicationSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.ContentBasedDeduplication != nil { + in, out := &in.ContentBasedDeduplication, &out.ContentBasedDeduplication + *out = new(bool) + **out = **in + } + if in.DeliveryPolicy != nil { + in, out := &in.DeliveryPolicy, &out.DeliveryPolicy + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.FifoTopic != nil { + in, out := &in.FifoTopic, &out.FifoTopic + *out = new(bool) + **out = **in + } + if in.FirehoseSuccessFeedbackSampleRate != nil { + in, out := &in.FirehoseSuccessFeedbackSampleRate, &out.FirehoseSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.HTTPSuccessFeedbackSampleRate != nil { + in, out := &in.HTTPSuccessFeedbackSampleRate, &out.HTTPSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.KMSMasterKeyID != nil { + in, out := &in.KMSMasterKeyID, &out.KMSMasterKeyID + *out = new(string) + **out = **in + } + if in.LambdaSuccessFeedbackSampleRate != nil { + in, out := &in.LambdaSuccessFeedbackSampleRate, &out.LambdaSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.SignatureVersion != nil { + in, out := &in.SignatureVersion, &out.SignatureVersion + *out = new(float64) + **out = **in + } + if in.SqsSuccessFeedbackSampleRate != nil { + in, out := &in.SqsSuccessFeedbackSampleRate, &out.SqsSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TracingConfig != nil { + in, out := &in.TracingConfig, &out.TracingConfig + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicInitParameters. +func (in *TopicInitParameters) DeepCopy() *TopicInitParameters { + if in == nil { + return nil + } + out := new(TopicInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicList) DeepCopyInto(out *TopicList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Topic, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicList. +func (in *TopicList) DeepCopy() *TopicList { + if in == nil { + return nil + } + out := new(TopicList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TopicList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicObservation) DeepCopyInto(out *TopicObservation) { + *out = *in + if in.ApplicationFailureFeedbackRoleArn != nil { + in, out := &in.ApplicationFailureFeedbackRoleArn, &out.ApplicationFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.ApplicationSuccessFeedbackRoleArn != nil { + in, out := &in.ApplicationSuccessFeedbackRoleArn, &out.ApplicationSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.ApplicationSuccessFeedbackSampleRate != nil { + in, out := &in.ApplicationSuccessFeedbackSampleRate, &out.ApplicationSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.ContentBasedDeduplication != nil { + in, out := &in.ContentBasedDeduplication, &out.ContentBasedDeduplication + *out = new(bool) + **out = **in + } + if in.DeliveryPolicy != nil { + in, out := &in.DeliveryPolicy, &out.DeliveryPolicy + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.FifoTopic != nil { + in, out := &in.FifoTopic, &out.FifoTopic + *out = new(bool) + **out = **in + } + if in.FirehoseFailureFeedbackRoleArn != nil { + in, out := &in.FirehoseFailureFeedbackRoleArn, &out.FirehoseFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.FirehoseSuccessFeedbackRoleArn != nil { + in, out := &in.FirehoseSuccessFeedbackRoleArn, &out.FirehoseSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.FirehoseSuccessFeedbackSampleRate != nil { + in, out := &in.FirehoseSuccessFeedbackSampleRate, &out.FirehoseSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.HTTPFailureFeedbackRoleArn != nil { + in, out := &in.HTTPFailureFeedbackRoleArn, &out.HTTPFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.HTTPSuccessFeedbackRoleArn != nil { + in, out := &in.HTTPSuccessFeedbackRoleArn, &out.HTTPSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.HTTPSuccessFeedbackSampleRate != nil { + in, out := &in.HTTPSuccessFeedbackSampleRate, &out.HTTPSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.KMSMasterKeyID != nil { + in, out := &in.KMSMasterKeyID, &out.KMSMasterKeyID + *out = new(string) + **out = **in + } + if in.LambdaFailureFeedbackRoleArn != nil { + in, out := &in.LambdaFailureFeedbackRoleArn, &out.LambdaFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.LambdaSuccessFeedbackRoleArn != nil { + in, out := &in.LambdaSuccessFeedbackRoleArn, &out.LambdaSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.LambdaSuccessFeedbackSampleRate != nil { + in, out := &in.LambdaSuccessFeedbackSampleRate, &out.LambdaSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.SignatureVersion != nil { + in, out := &in.SignatureVersion, &out.SignatureVersion + *out = new(float64) + **out = **in + } + if in.SqsFailureFeedbackRoleArn != nil { + in, out := &in.SqsFailureFeedbackRoleArn, &out.SqsFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.SqsSuccessFeedbackRoleArn != nil { + in, out := &in.SqsSuccessFeedbackRoleArn, &out.SqsSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.SqsSuccessFeedbackSampleRate != nil { + in, out := &in.SqsSuccessFeedbackSampleRate, &out.SqsSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TracingConfig != nil { + in, out := &in.TracingConfig, &out.TracingConfig + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicObservation. +func (in *TopicObservation) DeepCopy() *TopicObservation { + if in == nil { + return nil + } + out := new(TopicObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicParameters) DeepCopyInto(out *TopicParameters) { + *out = *in + if in.ApplicationFailureFeedbackRoleArn != nil { + in, out := &in.ApplicationFailureFeedbackRoleArn, &out.ApplicationFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.ApplicationFailureFeedbackRoleArnRef != nil { + in, out := &in.ApplicationFailureFeedbackRoleArnRef, &out.ApplicationFailureFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ApplicationFailureFeedbackRoleArnSelector != nil { + in, out := &in.ApplicationFailureFeedbackRoleArnSelector, &out.ApplicationFailureFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.ApplicationSuccessFeedbackRoleArn != nil { + in, out := &in.ApplicationSuccessFeedbackRoleArn, &out.ApplicationSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.ApplicationSuccessFeedbackRoleArnRef != nil { + in, out := &in.ApplicationSuccessFeedbackRoleArnRef, &out.ApplicationSuccessFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ApplicationSuccessFeedbackRoleArnSelector != nil { + in, out := &in.ApplicationSuccessFeedbackRoleArnSelector, &out.ApplicationSuccessFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.ApplicationSuccessFeedbackSampleRate != nil { + in, out := &in.ApplicationSuccessFeedbackSampleRate, &out.ApplicationSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.ContentBasedDeduplication != nil { + in, out := &in.ContentBasedDeduplication, &out.ContentBasedDeduplication + *out = new(bool) + **out = **in + } + if in.DeliveryPolicy != nil { + in, out := &in.DeliveryPolicy, &out.DeliveryPolicy + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.FifoTopic != nil { + in, out := &in.FifoTopic, &out.FifoTopic + *out = new(bool) + **out = **in + } + if in.FirehoseFailureFeedbackRoleArn != nil { + in, out := &in.FirehoseFailureFeedbackRoleArn, &out.FirehoseFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.FirehoseFailureFeedbackRoleArnRef != nil { + in, out := &in.FirehoseFailureFeedbackRoleArnRef, &out.FirehoseFailureFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.FirehoseFailureFeedbackRoleArnSelector != nil { + in, out := &in.FirehoseFailureFeedbackRoleArnSelector, &out.FirehoseFailureFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.FirehoseSuccessFeedbackRoleArn != nil { + in, out := &in.FirehoseSuccessFeedbackRoleArn, &out.FirehoseSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.FirehoseSuccessFeedbackRoleArnRef != nil { + in, out := &in.FirehoseSuccessFeedbackRoleArnRef, &out.FirehoseSuccessFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.FirehoseSuccessFeedbackRoleArnSelector != nil { + in, out := &in.FirehoseSuccessFeedbackRoleArnSelector, &out.FirehoseSuccessFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.FirehoseSuccessFeedbackSampleRate != nil { + in, out := &in.FirehoseSuccessFeedbackSampleRate, &out.FirehoseSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.HTTPFailureFeedbackRoleArn != nil { + in, out := &in.HTTPFailureFeedbackRoleArn, &out.HTTPFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.HTTPFailureFeedbackRoleArnRef != nil { + in, out := &in.HTTPFailureFeedbackRoleArnRef, &out.HTTPFailureFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.HTTPFailureFeedbackRoleArnSelector != nil { + in, out := &in.HTTPFailureFeedbackRoleArnSelector, &out.HTTPFailureFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.HTTPSuccessFeedbackRoleArn != nil { + in, out := &in.HTTPSuccessFeedbackRoleArn, &out.HTTPSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.HTTPSuccessFeedbackRoleArnRef != nil { + in, out := &in.HTTPSuccessFeedbackRoleArnRef, &out.HTTPSuccessFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.HTTPSuccessFeedbackRoleArnSelector != nil { + in, out := &in.HTTPSuccessFeedbackRoleArnSelector, &out.HTTPSuccessFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.HTTPSuccessFeedbackSampleRate != nil { + in, out := &in.HTTPSuccessFeedbackSampleRate, &out.HTTPSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.KMSMasterKeyID != nil { + in, out := &in.KMSMasterKeyID, &out.KMSMasterKeyID + *out = new(string) + **out = **in + } + if in.LambdaFailureFeedbackRoleArn != nil { + in, out := &in.LambdaFailureFeedbackRoleArn, &out.LambdaFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.LambdaFailureFeedbackRoleArnRef != nil { + in, out := &in.LambdaFailureFeedbackRoleArnRef, &out.LambdaFailureFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.LambdaFailureFeedbackRoleArnSelector != nil { + in, out := &in.LambdaFailureFeedbackRoleArnSelector, &out.LambdaFailureFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.LambdaSuccessFeedbackRoleArn != nil { + in, out := &in.LambdaSuccessFeedbackRoleArn, &out.LambdaSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.LambdaSuccessFeedbackRoleArnRef != nil { + in, out := &in.LambdaSuccessFeedbackRoleArnRef, &out.LambdaSuccessFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.LambdaSuccessFeedbackRoleArnSelector != nil { + in, out := &in.LambdaSuccessFeedbackRoleArnSelector, &out.LambdaSuccessFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.LambdaSuccessFeedbackSampleRate != nil { + in, out := &in.LambdaSuccessFeedbackSampleRate, &out.LambdaSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SignatureVersion != nil { + in, out := &in.SignatureVersion, &out.SignatureVersion + *out = new(float64) + **out = **in + } + if in.SqsFailureFeedbackRoleArn != nil { + in, out := &in.SqsFailureFeedbackRoleArn, &out.SqsFailureFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.SqsFailureFeedbackRoleArnRef != nil { + in, out := &in.SqsFailureFeedbackRoleArnRef, &out.SqsFailureFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SqsFailureFeedbackRoleArnSelector != nil { + in, out := &in.SqsFailureFeedbackRoleArnSelector, &out.SqsFailureFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.SqsSuccessFeedbackRoleArn != nil { + in, out := &in.SqsSuccessFeedbackRoleArn, &out.SqsSuccessFeedbackRoleArn + *out = new(string) + **out = **in + } + if in.SqsSuccessFeedbackRoleArnRef != nil { + in, out := &in.SqsSuccessFeedbackRoleArnRef, &out.SqsSuccessFeedbackRoleArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SqsSuccessFeedbackRoleArnSelector != nil { + in, out := &in.SqsSuccessFeedbackRoleArnSelector, &out.SqsSuccessFeedbackRoleArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.SqsSuccessFeedbackSampleRate != nil { + in, out := &in.SqsSuccessFeedbackSampleRate, &out.SqsSuccessFeedbackSampleRate + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TracingConfig != nil { + in, out := &in.TracingConfig, &out.TracingConfig + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicParameters. +func (in *TopicParameters) DeepCopy() *TopicParameters { + if in == nil { + return nil + } + out := new(TopicParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicSpec) DeepCopyInto(out *TopicSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicSpec. +func (in *TopicSpec) DeepCopy() *TopicSpec { + if in == nil { + return nil + } + out := new(TopicSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopicStatus) DeepCopyInto(out *TopicStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicStatus. +func (in *TopicStatus) DeepCopy() *TopicStatus { + if in == nil { + return nil + } + out := new(TopicStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/sns/v1alpha1/zz_generated.managed.go b/apis/sns/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..3b3d809 --- /dev/null +++ b/apis/sns/v1alpha1/zz_generated.managed.go @@ -0,0 +1,68 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Topic. +func (mg *Topic) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Topic. +func (mg *Topic) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Topic. +func (mg *Topic) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Topic. +func (mg *Topic) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Topic. +func (mg *Topic) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Topic. +func (mg *Topic) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Topic. +func (mg *Topic) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Topic. +func (mg *Topic) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Topic. +func (mg *Topic) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Topic. +func (mg *Topic) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Topic. +func (mg *Topic) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Topic. +func (mg *Topic) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/sns/v1alpha1/zz_generated.managedlist.go b/apis/sns/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..742e2b6 --- /dev/null +++ b/apis/sns/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,17 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this TopicList. +func (l *TopicList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/sns/v1alpha1/zz_generated.resolvers.go b/apis/sns/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..6b560a8 --- /dev/null +++ b/apis/sns/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + v1alpha1 "kubedb.dev/provider-aws/apis/iam/v1alpha1" + common "kubedb.dev/provider-aws/config/common" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Topic. +func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArn") + } + mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArn") + } + mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArn") + } + mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArn") + } + mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HTTPFailureFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.HTTPFailureFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.HTTPFailureFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.HTTPFailureFeedbackRoleArn") + } + mg.Spec.ForProvider.HTTPFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.HTTPFailureFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArn") + } + mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaFailureFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.LambdaFailureFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.LambdaFailureFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.LambdaFailureFeedbackRoleArn") + } + mg.Spec.ForProvider.LambdaFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.LambdaFailureFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArn") + } + mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SqsFailureFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.SqsFailureFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.SqsFailureFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SqsFailureFeedbackRoleArn") + } + mg.Spec.ForProvider.SqsFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SqsFailureFeedbackRoleArnRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SqsSuccessFeedbackRoleArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.SqsSuccessFeedbackRoleArnRef, + Selector: mg.Spec.ForProvider.SqsSuccessFeedbackRoleArnSelector, + To: reference.To{ + List: &v1alpha1.RoleList{}, + Managed: &v1alpha1.Role{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SqsSuccessFeedbackRoleArn") + } + mg.Spec.ForProvider.SqsSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SqsSuccessFeedbackRoleArnRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/sns/v1alpha1/zz_generated_terraformed.go b/apis/sns/v1alpha1/zz_generated_terraformed.go new file mode 100755 index 0000000..50fa023 --- /dev/null +++ b/apis/sns/v1alpha1/zz_generated_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Topic +func (mg *Topic) GetTerraformResourceType() string { + return "aws_sns_topic" +} + +// GetConnectionDetailsMapping for this Topic +func (tr *Topic) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Topic +func (tr *Topic) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Topic +func (tr *Topic) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Topic +func (tr *Topic) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Topic +func (tr *Topic) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Topic +func (tr *Topic) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Topic +func (tr *Topic) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Topic +func (tr *Topic) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Topic using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Topic) LateInitialize(attrs []byte) (bool, error) { + params := &TopicParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Topic) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/sns/v1alpha1/zz_groupversion_info.go b/apis/sns/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..8461c06 --- /dev/null +++ b/apis/sns/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=sns.aws.kubedb.com +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "sns.aws.kubedb.com" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/sns/v1alpha1/zz_topic_types.go b/apis/sns/v1alpha1/zz_topic_types.go new file mode 100755 index 0000000..c2a9de4 --- /dev/null +++ b/apis/sns/v1alpha1/zz_topic_types.go @@ -0,0 +1,422 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type TopicInitParameters struct { + + // Percentage of success to sample + ApplicationSuccessFeedbackSampleRate *float64 `json:"applicationSuccessFeedbackSampleRate,omitempty" tf:"application_success_feedback_sample_rate,omitempty"` + + // Enables content-based deduplication for FIFO topics. For more information, see the related documentation + ContentBasedDeduplication *bool `json:"contentBasedDeduplication,omitempty" tf:"content_based_deduplication,omitempty"` + + // The SNS delivery policy. More on AWS documentation + DeliveryPolicy *string `json:"deliveryPolicy,omitempty" tf:"delivery_policy,omitempty"` + + // The display name for the topic + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Boolean indicating whether or not to create a FIFO (first-in-first-out) topic (default is false). + FifoTopic *bool `json:"fifoTopic,omitempty" tf:"fifo_topic,omitempty"` + + // Percentage of success to sample + FirehoseSuccessFeedbackSampleRate *float64 `json:"firehoseSuccessFeedbackSampleRate,omitempty" tf:"firehose_success_feedback_sample_rate,omitempty"` + + // Percentage of success to sample + HTTPSuccessFeedbackSampleRate *float64 `json:"httpSuccessFeedbackSampleRate,omitempty" tf:"http_success_feedback_sample_rate,omitempty"` + + // The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms + KMSMasterKeyID *string `json:"kmsMasterKeyId,omitempty" tf:"kms_master_key_id,omitempty"` + + // Percentage of success to sample + LambdaSuccessFeedbackSampleRate *float64 `json:"lambdaSuccessFeedbackSampleRate,omitempty" tf:"lambda_success_feedback_sample_rate,omitempty"` + + // The fully-formed AWS policy as JSON. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. + SignatureVersion *float64 `json:"signatureVersion,omitempty" tf:"signature_version,omitempty"` + + // Percentage of success to sample + SqsSuccessFeedbackSampleRate *float64 `json:"sqsSuccessFeedbackSampleRate,omitempty" tf:"sqs_success_feedback_sample_rate,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Tracing mode of an Amazon SNS topic. Valid values: "PassThrough", "Active". + TracingConfig *string `json:"tracingConfig,omitempty" tf:"tracing_config,omitempty"` +} + +type TopicObservation struct { + + // IAM role for failure feedback + ApplicationFailureFeedbackRoleArn *string `json:"applicationFailureFeedbackRoleArn,omitempty" tf:"application_failure_feedback_role_arn,omitempty"` + + // The IAM role permitted to receive success feedback for this topic + ApplicationSuccessFeedbackRoleArn *string `json:"applicationSuccessFeedbackRoleArn,omitempty" tf:"application_success_feedback_role_arn,omitempty"` + + // Percentage of success to sample + ApplicationSuccessFeedbackSampleRate *float64 `json:"applicationSuccessFeedbackSampleRate,omitempty" tf:"application_success_feedback_sample_rate,omitempty"` + + // The ARN of the SNS topic, as a more obvious property (clone of id) + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Enables content-based deduplication for FIFO topics. For more information, see the related documentation + ContentBasedDeduplication *bool `json:"contentBasedDeduplication,omitempty" tf:"content_based_deduplication,omitempty"` + + // The SNS delivery policy. More on AWS documentation + DeliveryPolicy *string `json:"deliveryPolicy,omitempty" tf:"delivery_policy,omitempty"` + + // The display name for the topic + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Boolean indicating whether or not to create a FIFO (first-in-first-out) topic (default is false). + FifoTopic *bool `json:"fifoTopic,omitempty" tf:"fifo_topic,omitempty"` + + // IAM role for failure feedback + FirehoseFailureFeedbackRoleArn *string `json:"firehoseFailureFeedbackRoleArn,omitempty" tf:"firehose_failure_feedback_role_arn,omitempty"` + + // The IAM role permitted to receive success feedback for this topic + FirehoseSuccessFeedbackRoleArn *string `json:"firehoseSuccessFeedbackRoleArn,omitempty" tf:"firehose_success_feedback_role_arn,omitempty"` + + // Percentage of success to sample + FirehoseSuccessFeedbackSampleRate *float64 `json:"firehoseSuccessFeedbackSampleRate,omitempty" tf:"firehose_success_feedback_sample_rate,omitempty"` + + // IAM role for failure feedback + HTTPFailureFeedbackRoleArn *string `json:"httpFailureFeedbackRoleArn,omitempty" tf:"http_failure_feedback_role_arn,omitempty"` + + // The IAM role permitted to receive success feedback for this topic + HTTPSuccessFeedbackRoleArn *string `json:"httpSuccessFeedbackRoleArn,omitempty" tf:"http_success_feedback_role_arn,omitempty"` + + // Percentage of success to sample + HTTPSuccessFeedbackSampleRate *float64 `json:"httpSuccessFeedbackSampleRate,omitempty" tf:"http_success_feedback_sample_rate,omitempty"` + + // The ARN of the SNS topic + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms + KMSMasterKeyID *string `json:"kmsMasterKeyId,omitempty" tf:"kms_master_key_id,omitempty"` + + // IAM role for failure feedback + LambdaFailureFeedbackRoleArn *string `json:"lambdaFailureFeedbackRoleArn,omitempty" tf:"lambda_failure_feedback_role_arn,omitempty"` + + // The IAM role permitted to receive success feedback for this topic + LambdaSuccessFeedbackRoleArn *string `json:"lambdaSuccessFeedbackRoleArn,omitempty" tf:"lambda_success_feedback_role_arn,omitempty"` + + // Percentage of success to sample + LambdaSuccessFeedbackSampleRate *float64 `json:"lambdaSuccessFeedbackSampleRate,omitempty" tf:"lambda_success_feedback_sample_rate,omitempty"` + + // The AWS Account ID of the SNS topic owner + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // The fully-formed AWS policy as JSON. + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. + SignatureVersion *float64 `json:"signatureVersion,omitempty" tf:"signature_version,omitempty"` + + // IAM role for failure feedback + SqsFailureFeedbackRoleArn *string `json:"sqsFailureFeedbackRoleArn,omitempty" tf:"sqs_failure_feedback_role_arn,omitempty"` + + // The IAM role permitted to receive success feedback for this topic + SqsSuccessFeedbackRoleArn *string `json:"sqsSuccessFeedbackRoleArn,omitempty" tf:"sqs_success_feedback_role_arn,omitempty"` + + // Percentage of success to sample + SqsSuccessFeedbackSampleRate *float64 `json:"sqsSuccessFeedbackSampleRate,omitempty" tf:"sqs_success_feedback_sample_rate,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Tracing mode of an Amazon SNS topic. Valid values: "PassThrough", "Active". + TracingConfig *string `json:"tracingConfig,omitempty" tf:"tracing_config,omitempty"` +} + +type TopicParameters struct { + + // IAM role for failure feedback + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + ApplicationFailureFeedbackRoleArn *string `json:"applicationFailureFeedbackRoleArn,omitempty" tf:"application_failure_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate applicationFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + ApplicationFailureFeedbackRoleArnRef *v1.Reference `json:"applicationFailureFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate applicationFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + ApplicationFailureFeedbackRoleArnSelector *v1.Selector `json:"applicationFailureFeedbackRoleArnSelector,omitempty" tf:"-"` + + // The IAM role permitted to receive success feedback for this topic + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + ApplicationSuccessFeedbackRoleArn *string `json:"applicationSuccessFeedbackRoleArn,omitempty" tf:"application_success_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate applicationSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + ApplicationSuccessFeedbackRoleArnRef *v1.Reference `json:"applicationSuccessFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate applicationSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + ApplicationSuccessFeedbackRoleArnSelector *v1.Selector `json:"applicationSuccessFeedbackRoleArnSelector,omitempty" tf:"-"` + + // Percentage of success to sample + // +kubebuilder:validation:Optional + ApplicationSuccessFeedbackSampleRate *float64 `json:"applicationSuccessFeedbackSampleRate,omitempty" tf:"application_success_feedback_sample_rate,omitempty"` + + // Enables content-based deduplication for FIFO topics. For more information, see the related documentation + // +kubebuilder:validation:Optional + ContentBasedDeduplication *bool `json:"contentBasedDeduplication,omitempty" tf:"content_based_deduplication,omitempty"` + + // The SNS delivery policy. More on AWS documentation + // +kubebuilder:validation:Optional + DeliveryPolicy *string `json:"deliveryPolicy,omitempty" tf:"delivery_policy,omitempty"` + + // The display name for the topic + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Boolean indicating whether or not to create a FIFO (first-in-first-out) topic (default is false). + // +kubebuilder:validation:Optional + FifoTopic *bool `json:"fifoTopic,omitempty" tf:"fifo_topic,omitempty"` + + // IAM role for failure feedback + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + FirehoseFailureFeedbackRoleArn *string `json:"firehoseFailureFeedbackRoleArn,omitempty" tf:"firehose_failure_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate firehoseFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + FirehoseFailureFeedbackRoleArnRef *v1.Reference `json:"firehoseFailureFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate firehoseFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + FirehoseFailureFeedbackRoleArnSelector *v1.Selector `json:"firehoseFailureFeedbackRoleArnSelector,omitempty" tf:"-"` + + // The IAM role permitted to receive success feedback for this topic + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + FirehoseSuccessFeedbackRoleArn *string `json:"firehoseSuccessFeedbackRoleArn,omitempty" tf:"firehose_success_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate firehoseSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + FirehoseSuccessFeedbackRoleArnRef *v1.Reference `json:"firehoseSuccessFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate firehoseSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + FirehoseSuccessFeedbackRoleArnSelector *v1.Selector `json:"firehoseSuccessFeedbackRoleArnSelector,omitempty" tf:"-"` + + // Percentage of success to sample + // +kubebuilder:validation:Optional + FirehoseSuccessFeedbackSampleRate *float64 `json:"firehoseSuccessFeedbackSampleRate,omitempty" tf:"firehose_success_feedback_sample_rate,omitempty"` + + // IAM role for failure feedback + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + HTTPFailureFeedbackRoleArn *string `json:"httpFailureFeedbackRoleArn,omitempty" tf:"http_failure_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate httpFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + HTTPFailureFeedbackRoleArnRef *v1.Reference `json:"httpFailureFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate httpFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + HTTPFailureFeedbackRoleArnSelector *v1.Selector `json:"httpFailureFeedbackRoleArnSelector,omitempty" tf:"-"` + + // The IAM role permitted to receive success feedback for this topic + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + HTTPSuccessFeedbackRoleArn *string `json:"httpSuccessFeedbackRoleArn,omitempty" tf:"http_success_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate httpSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + HTTPSuccessFeedbackRoleArnRef *v1.Reference `json:"httpSuccessFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate httpSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + HTTPSuccessFeedbackRoleArnSelector *v1.Selector `json:"httpSuccessFeedbackRoleArnSelector,omitempty" tf:"-"` + + // Percentage of success to sample + // +kubebuilder:validation:Optional + HTTPSuccessFeedbackSampleRate *float64 `json:"httpSuccessFeedbackSampleRate,omitempty" tf:"http_success_feedback_sample_rate,omitempty"` + + // The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms + // +kubebuilder:validation:Optional + KMSMasterKeyID *string `json:"kmsMasterKeyId,omitempty" tf:"kms_master_key_id,omitempty"` + + // IAM role for failure feedback + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + LambdaFailureFeedbackRoleArn *string `json:"lambdaFailureFeedbackRoleArn,omitempty" tf:"lambda_failure_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate lambdaFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + LambdaFailureFeedbackRoleArnRef *v1.Reference `json:"lambdaFailureFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate lambdaFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + LambdaFailureFeedbackRoleArnSelector *v1.Selector `json:"lambdaFailureFeedbackRoleArnSelector,omitempty" tf:"-"` + + // The IAM role permitted to receive success feedback for this topic + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + LambdaSuccessFeedbackRoleArn *string `json:"lambdaSuccessFeedbackRoleArn,omitempty" tf:"lambda_success_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate lambdaSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + LambdaSuccessFeedbackRoleArnRef *v1.Reference `json:"lambdaSuccessFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate lambdaSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + LambdaSuccessFeedbackRoleArnSelector *v1.Selector `json:"lambdaSuccessFeedbackRoleArnSelector,omitempty" tf:"-"` + + // Percentage of success to sample + // +kubebuilder:validation:Optional + LambdaSuccessFeedbackSampleRate *float64 `json:"lambdaSuccessFeedbackSampleRate,omitempty" tf:"lambda_success_feedback_sample_rate,omitempty"` + + // The fully-formed AWS policy as JSON. + // +kubebuilder:validation:Optional + Policy *string `json:"policy,omitempty" tf:"policy,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"-"` + + // If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. + // +kubebuilder:validation:Optional + SignatureVersion *float64 `json:"signatureVersion,omitempty" tf:"signature_version,omitempty"` + + // IAM role for failure feedback + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + SqsFailureFeedbackRoleArn *string `json:"sqsFailureFeedbackRoleArn,omitempty" tf:"sqs_failure_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate sqsFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + SqsFailureFeedbackRoleArnRef *v1.Reference `json:"sqsFailureFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate sqsFailureFeedbackRoleArn. + // +kubebuilder:validation:Optional + SqsFailureFeedbackRoleArnSelector *v1.Selector `json:"sqsFailureFeedbackRoleArnSelector,omitempty" tf:"-"` + + // The IAM role permitted to receive success feedback for this topic + // +crossplane:generate:reference:type=kubedb.dev/provider-aws/apis/iam/v1alpha1.Role + // +crossplane:generate:reference:extractor=kubedb.dev/provider-aws/config/common.ARNExtractor() + // +kubebuilder:validation:Optional + SqsSuccessFeedbackRoleArn *string `json:"sqsSuccessFeedbackRoleArn,omitempty" tf:"sqs_success_feedback_role_arn,omitempty"` + + // Reference to a Role in iam to populate sqsSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + SqsSuccessFeedbackRoleArnRef *v1.Reference `json:"sqsSuccessFeedbackRoleArnRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate sqsSuccessFeedbackRoleArn. + // +kubebuilder:validation:Optional + SqsSuccessFeedbackRoleArnSelector *v1.Selector `json:"sqsSuccessFeedbackRoleArnSelector,omitempty" tf:"-"` + + // Percentage of success to sample + // +kubebuilder:validation:Optional + SqsSuccessFeedbackSampleRate *float64 `json:"sqsSuccessFeedbackSampleRate,omitempty" tf:"sqs_success_feedback_sample_rate,omitempty"` + + // Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. + // +kubebuilder:validation:Optional + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. + // +kubebuilder:validation:Optional + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // Tracing mode of an Amazon SNS topic. Valid values: "PassThrough", "Active". + // +kubebuilder:validation:Optional + TracingConfig *string `json:"tracingConfig,omitempty" tf:"tracing_config,omitempty"` +} + +// TopicSpec defines the desired state of Topic +type TopicSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider TopicParameters `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 + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // 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 TopicInitParameters `json:"initProvider,omitempty"` +} + +// TopicStatus defines the observed state of Topic. +type TopicStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider TopicObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Topic is the Schema for the Topics API. Provides an SNS topic resource. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type Topic 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.region)",message="spec.forProvider.region is a required parameter" + Spec TopicSpec `json:"spec"` + Status TopicStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// TopicList contains a list of Topics +type TopicList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Topic `json:"items"` +} + +// Repository type metadata. +var ( + Topic_Kind = "Topic" + Topic_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Topic_Kind}.String() + Topic_KindAPIVersion = Topic_Kind + "." + CRDGroupVersion.String() + Topic_GroupVersionKind = CRDGroupVersion.WithKind(Topic_Kind) +) + +func init() { + SchemeBuilder.Register(&Topic{}, &TopicList{}) +} diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9d284ba..86f2d29 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/v1beta1/types.go b/apis/v1beta1/types.go index 712bafc..0d8883a 100644 --- a/apis/v1beta1/types.go +++ b/apis/v1beta1/types.go @@ -5,23 +5,212 @@ Copyright 2022 Upbound Inc. package v1beta1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // A ProviderConfigSpec defines the desired state of a ProviderConfig. type ProviderConfigSpec struct { // Credentials required to authenticate to this provider. Credentials ProviderCredentials `json:"credentials"` + + // AssumeRoleChain defines the options for assuming an IAM role + AssumeRoleChain []AssumeRoleOptions `json:"assumeRoleChain,omitempty"` + + // Endpoint is where you can override the default endpoint configuration + // of AWS calls made by the provider. + // +optional + Endpoint *EndpointConfig `json:"endpoint,omitempty"` + // Whether to skip credentials validation via the STS API. + // This can be useful for testing and for AWS API implementations that do not have STS available. + // +optional + SkipCredsValidation bool `json:"skip_credentials_validation,omitempty"` + // Whether to skip validation of provided region name. + // Useful for AWS-like implementations that use their own region names or to bypass the validation for + // regions that aren't publicly available yet. + // +optional + SkipRegionValidation bool `json:"skip_region_validation,omitempty"` + // Whether to enable the request to use path-style addressing, i.e., https://s3.amazonaws.com/BUCKET/KEY. + // +optional + S3UsePathStyle bool `json:"s3_use_path_style,omitempty"` + // Whether to skip the AWS Metadata API check + // Useful for AWS API implementations that do not have a metadata API endpoint. + // +optional + SkipMetadataApiCheck bool `json:"skip_metadata_api_check,omitempty"` + // Whether to skip requesting the account ID. + // Useful for AWS API implementations that do not have the IAM, STS API, or metadata API + // +optional + SkipReqAccountId bool `json:"skip_requesting_account_id,omitempty"` +} + +// AssumeRoleOptions define the options for assuming an IAM Role +// Fields are similar to the STS AssumeRoleOptions in the AWS SDK +type AssumeRoleOptions struct { + // AssumeRoleARN to assume with provider credentials + RoleARN *string `json:"roleARN,omitempty"` + + // ExternalID is the external ID used when assuming role. + // +optional + ExternalID *string `json:"externalID,omitempty"` + + // Tags is list of session tags that you want to pass. Each session tag consists of a key + // name and an associated value. For more information about session tags, see + // Tagging STS Sessions + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html). + // +optional + Tags []Tag `json:"tags,omitempty"` + + // TransitiveTagKeys is a list of keys for session tags that you want to set as transitive. If you set a + // tag key as transitive, the corresponding key and value passes to subsequent + // sessions in a role chain. For more information, see Chaining Roles with Session Tags + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining). + // +optional + TransitiveTagKeys []string `json:"transitiveTagKeys,omitempty"` +} + +// AssumeRoleWithWebIdentityOptions define the options for assuming an IAM Role +// Fields are similar to the STS WebIdentityRoleOptions in the AWS SDK +type AssumeRoleWithWebIdentityOptions struct { + // AssumeRoleARN to assume with provider credentials + RoleARN *string `json:"roleARN,omitempty"` + + // RoleSessionName is the session name, if you wish to uniquely identify this session. + // +optional + RoleSessionName string `json:"roleSessionName,omitempty"` +} + +// Upbound defines the options for authenticating using Upbound as an identity +// provider. +type Upbound struct { + // WebIdentity defines the options for assuming an IAM role with a Web + // Identity. + WebIdentity *AssumeRoleWithWebIdentityOptions `json:"webIdentity,omitempty"` +} + +// EndpointConfig is used to configure the AWS client for a custom endpoint. +type EndpointConfig struct { + // URL lets you configure the endpoint URL to be used in SDK calls. + URL URLConfig `json:"url"` + // Specifies the list of services you want endpoint to be used for + Services []string `json:"services,omitempty"` + + // Specifies if the endpoint's hostname can be modified by the SDK's API + // client. + // + // If the hostname is mutable the SDK API clients may modify any part of + // the hostname based on the requirements of the API, (e.g. adding, or + // removing content in the hostname). Such as, Amazon S3 API client + // prefixing "bucketname" to the hostname, or changing the + // hostname service name component from "s3." to "s3-accesspoint.dualstack." + // for the dualstack endpoint of an S3 Accesspoint resource. + // + // Care should be taken when providing a custom endpoint for an API. If the + // endpoint hostname is mutable, and the client cannot modify the endpoint + // correctly, the operation call will most likely fail, or have undefined + // behavior. + // + // If hostname is immutable, the SDK API clients will not modify the + // hostname of the URL. This may cause the API client not to function + // correctly if the API requires the operation specific hostname values + // to be used by the client. + // + // This flag does not modify the API client's behavior if this endpoint + // will be used instead of Endpoint Discovery, or if the endpoint will be + // used to perform Endpoint Discovery. That behavior is configured via the + // API Client's Options. + // Note that this is effective only for resources that use AWS SDK v2. + // +optional + HostnameImmutable *bool `json:"hostnameImmutable,omitempty"` + + // The AWS partition the endpoint belongs to. + // +optional + PartitionID *string `json:"partitionId,omitempty"` + + // The service name that should be used for signing the requests to the + // endpoint. + // +optional + SigningName *string `json:"signingName,omitempty"` + + // The region that should be used for signing the request to the endpoint. + // For IAM, which doesn't have any region, us-east-1 is used to sign the + // requests, which is the only signing region of IAM. + // +optional + SigningRegion *string `json:"signingRegion,omitempty"` + + // The signing method that should be used for signing the requests to the + // endpoint. + // +optional + SigningMethod *string `json:"signingMethod,omitempty"` + + // The source of the Endpoint. By default, this will be ServiceMetadata. + // When providing a custom endpoint, you should set the source as Custom. + // If source is not provided when providing a custom endpoint, the SDK may not + // perform required host mutations correctly. Source should be used along with + // HostnameImmutable property as per the usage requirement. + // Note that this is effective only for resources that use AWS SDK v2. + // +optional + // +kubebuilder:validation:Enum=ServiceMetadata;Custom + Source *string `json:"source,omitempty"` +} + +// URLConfig lets users configure the URL of the AWS SDK calls. +type URLConfig struct { + // You can provide a static URL that will be used regardless of the service + // and region by choosing Static type. Alternatively, you can provide + // configuration for dynamically resolving the URL with the config you provide + // once you set the type as Dynamic. + // +kubebuilder:validation:Enum=Static;Dynamic + Type string `json:"type"` + + // Static is the full URL you'd like the AWS SDK to use. + // Recommended for using tools like localstack where a single host is exposed + // for all services and regions. + // +optional + Static *string `json:"static,omitempty"` + + // Dynamic lets you configure the behavior of endpoint URL resolver. + // +optional + Dynamic *DynamicURLConfig `json:"dynamic,omitempty"` +} + +// DynamicURLConfig lets users configure endpoint resolving functionality. +type DynamicURLConfig struct { + // Protocol is the HTTP protocol that will be used in the URL. Currently, + // only http and https are supported. + // +kubebuilder:validation:Enum=http;https + Protocol string `json:"protocol"` + + // Host is the address of the main host that the resolver will use to + // prepend protocol, service and region configurations. + // For example, the final URL for EC2 in us-east-1 looks like https://ec2.us-east-1.amazonaws.com + // You would need to use "amazonaws.com" as Host and "https" as protocol + // to have the resolver construct it. + Host string `json:"host"` +} + +// Tag is session tag that can be used to assume an IAM Role +type Tag struct { + // Name of the tag. + // Key is a required field + Key *string `json:"key"` + + // Value of the tag. + // Value is a required field + Value *string `json:"value"` } // ProviderCredentials required to authenticate. type ProviderCredentials struct { // Source of the provider credentials. - // +kubebuilder:validation:Enum=None;Secret;InjectedIdentity;Environment;Filesystem + // +kubebuilder:validation:Enum=None;Secret;IRSA;WebIdentity;Upbound Source xpv1.CredentialsSource `json:"source"` + // WebIdentity defines the options for assuming an IAM role with a Web Identity. + WebIdentity *AssumeRoleWithWebIdentityOptions `json:"webIdentity,omitempty"` + + // Upbound defines the options for authenticating using Upbound as an identity provider. + Upbound *Upbound `json:"upbound,omitempty"` + xpv1.CommonCredentialSelectors `json:",inline"` } @@ -32,12 +221,13 @@ type ProviderConfigStatus struct { // +kubebuilder:object:root=true -// A ProviderConfig configures a AWS provider. +// A ProviderConfig configures the AWS provider. // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:printcolumn:name="SECRET-NAME",type="string",JSONPath=".spec.credentials.secretRef.name",priority=1 +// +kubebuilder:printcolumn:name="SOURCE",type="string",JSONPath=".spec.source",priority=1 // +kubebuilder:resource:scope=Cluster -// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,aws} +// +kubebuilder:resource:scope=Cluster,categories={crossplane,providerconfig,aws} +// +kubebuilder:storageversion type ProviderConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -62,7 +252,8 @@ type ProviderConfigList struct { // +kubebuilder:printcolumn:name="CONFIG-NAME",type="string",JSONPath=".providerConfigRef.name" // +kubebuilder:printcolumn:name="RESOURCE-KIND",type="string",JSONPath=".resourceRef.kind" // +kubebuilder:printcolumn:name="RESOURCE-NAME",type="string",JSONPath=".resourceRef.name" -// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,aws} +// +kubebuilder:resource:scope=Cluster,categories={crossplane,providerconfig,aws} +// +kubebuilder:storageversion type ProviderConfigUsage struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/apis/v1beta1/zz_generated.deepcopy.go b/apis/v1beta1/zz_generated.deepcopy.go index ae71405..20af3f5 100644 --- a/apis/v1beta1/zz_generated.deepcopy.go +++ b/apis/v1beta1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -13,6 +12,129 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssumeRoleOptions) DeepCopyInto(out *AssumeRoleOptions) { + *out = *in + if in.RoleARN != nil { + in, out := &in.RoleARN, &out.RoleARN + *out = new(string) + **out = **in + } + if in.ExternalID != nil { + in, out := &in.ExternalID, &out.ExternalID + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]Tag, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TransitiveTagKeys != nil { + in, out := &in.TransitiveTagKeys, &out.TransitiveTagKeys + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssumeRoleOptions. +func (in *AssumeRoleOptions) DeepCopy() *AssumeRoleOptions { + if in == nil { + return nil + } + out := new(AssumeRoleOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssumeRoleWithWebIdentityOptions) DeepCopyInto(out *AssumeRoleWithWebIdentityOptions) { + *out = *in + if in.RoleARN != nil { + in, out := &in.RoleARN, &out.RoleARN + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssumeRoleWithWebIdentityOptions. +func (in *AssumeRoleWithWebIdentityOptions) DeepCopy() *AssumeRoleWithWebIdentityOptions { + if in == nil { + return nil + } + out := new(AssumeRoleWithWebIdentityOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DynamicURLConfig) DeepCopyInto(out *DynamicURLConfig) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicURLConfig. +func (in *DynamicURLConfig) DeepCopy() *DynamicURLConfig { + if in == nil { + return nil + } + out := new(DynamicURLConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointConfig) DeepCopyInto(out *EndpointConfig) { + *out = *in + in.URL.DeepCopyInto(&out.URL) + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.HostnameImmutable != nil { + in, out := &in.HostnameImmutable, &out.HostnameImmutable + *out = new(bool) + **out = **in + } + if in.PartitionID != nil { + in, out := &in.PartitionID, &out.PartitionID + *out = new(string) + **out = **in + } + if in.SigningName != nil { + in, out := &in.SigningName, &out.SigningName + *out = new(string) + **out = **in + } + if in.SigningRegion != nil { + in, out := &in.SigningRegion, &out.SigningRegion + *out = new(string) + **out = **in + } + if in.SigningMethod != nil { + in, out := &in.SigningMethod, &out.SigningMethod + *out = new(string) + **out = **in + } + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointConfig. +func (in *EndpointConfig) DeepCopy() *EndpointConfig { + if in == nil { + return nil + } + out := new(EndpointConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProviderConfig) DeepCopyInto(out *ProviderConfig) { *out = *in @@ -76,6 +198,18 @@ func (in *ProviderConfigList) DeepCopyObject() runtime.Object { func (in *ProviderConfigSpec) DeepCopyInto(out *ProviderConfigSpec) { *out = *in in.Credentials.DeepCopyInto(&out.Credentials) + if in.AssumeRoleChain != nil { + in, out := &in.AssumeRoleChain, &out.AssumeRoleChain + *out = make([]AssumeRoleOptions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Endpoint != nil { + in, out := &in.Endpoint, &out.Endpoint + *out = new(EndpointConfig) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfigSpec. @@ -165,6 +299,16 @@ func (in *ProviderConfigUsageList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProviderCredentials) DeepCopyInto(out *ProviderCredentials) { *out = *in + if in.WebIdentity != nil { + in, out := &in.WebIdentity, &out.WebIdentity + *out = new(AssumeRoleWithWebIdentityOptions) + (*in).DeepCopyInto(*out) + } + if in.Upbound != nil { + in, out := &in.Upbound, &out.Upbound + *out = new(Upbound) + (*in).DeepCopyInto(*out) + } in.CommonCredentialSelectors.DeepCopyInto(&out.CommonCredentialSelectors) } @@ -177,3 +321,73 @@ func (in *ProviderCredentials) DeepCopy() *ProviderCredentials { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Tag) DeepCopyInto(out *Tag) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag. +func (in *Tag) DeepCopy() *Tag { + if in == nil { + return nil + } + out := new(Tag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *URLConfig) DeepCopyInto(out *URLConfig) { + *out = *in + if in.Static != nil { + in, out := &in.Static, &out.Static + *out = new(string) + **out = **in + } + if in.Dynamic != nil { + in, out := &in.Dynamic, &out.Dynamic + *out = new(DynamicURLConfig) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new URLConfig. +func (in *URLConfig) DeepCopy() *URLConfig { + if in == nil { + return nil + } + out := new(URLConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Upbound) DeepCopyInto(out *Upbound) { + *out = *in + if in.WebIdentity != nil { + in, out := &in.WebIdentity, &out.WebIdentity + *out = new(AssumeRoleWithWebIdentityOptions) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upbound. +func (in *Upbound) DeepCopy() *Upbound { + if in == nil { + return nil + } + out := new(Upbound) + in.DeepCopyInto(out) + return out +} diff --git a/apis/zz_register.go b/apis/zz_register.go index fd52511..e4154d8 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -15,11 +19,14 @@ import ( v1alpha1ec2 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" v1alpha1elasticache "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" v1alpha1elasticsearch "kubedb.dev/provider-aws/apis/elasticsearch/v1alpha1" + v1alpha1iam "kubedb.dev/provider-aws/apis/iam/v1alpha1" v1alpha1kafka "kubedb.dev/provider-aws/apis/kafka/v1alpha1" v1alpha1kinesis "kubedb.dev/provider-aws/apis/kinesis/v1alpha1" v1alpha1kms "kubedb.dev/provider-aws/apis/kms/v1alpha1" v1alpha1memorydb "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" v1alpha1rds "kubedb.dev/provider-aws/apis/rds/v1alpha1" + v1alpha1secretsmanager "kubedb.dev/provider-aws/apis/secretsmanager/v1alpha1" + v1alpha1sns "kubedb.dev/provider-aws/apis/sns/v1alpha1" v1alpha1apis "kubedb.dev/provider-aws/apis/v1alpha1" v1beta1 "kubedb.dev/provider-aws/apis/v1beta1" ) @@ -32,11 +39,14 @@ func init() { v1alpha1ec2.SchemeBuilder.AddToScheme, v1alpha1elasticache.SchemeBuilder.AddToScheme, v1alpha1elasticsearch.SchemeBuilder.AddToScheme, + v1alpha1iam.SchemeBuilder.AddToScheme, v1alpha1kafka.SchemeBuilder.AddToScheme, v1alpha1kinesis.SchemeBuilder.AddToScheme, v1alpha1kms.SchemeBuilder.AddToScheme, v1alpha1memorydb.SchemeBuilder.AddToScheme, v1alpha1rds.SchemeBuilder.AddToScheme, + v1alpha1secretsmanager.SchemeBuilder.AddToScheme, + v1alpha1sns.SchemeBuilder.AddToScheme, v1alpha1apis.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme, ) diff --git a/cmd/generator/main.go b/cmd/generator/main.go index 0672a46..d98d2a3 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -5,11 +5,12 @@ Copyright 2021 Upbound Inc. package main import ( + "context" "fmt" "os" "path/filepath" - "github.com/upbound/upjet/pkg/pipeline" + "github.com/crossplane/upjet/pkg/pipeline" "kubedb.dev/provider-aws/config" ) @@ -23,5 +24,6 @@ func main() { if err != nil { panic(fmt.Sprintf("cannot calculate the absolute path with %s", rootDir)) } - pipeline.Run(config.GetProvider(), absRootDir) + p, err := config.GetProvider(context.Background(), true) + pipeline.Run(p, absRootDir) } diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 1403ee6..39ed2b7 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -6,8 +6,12 @@ package main import ( "context" + "github.com/crossplane/crossplane-runtime/pkg/certificates" + "github.com/crossplane/crossplane-runtime/pkg/feature" + "gopkg.in/alecthomas/kingpin.v2" "os" "path/filepath" + "sigs.k8s.io/controller-runtime/pkg/cache" "time" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -15,9 +19,8 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" - "gopkg.in/alecthomas/kingpin.v2" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/terraform" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/leaderelection/resourcelock" @@ -34,19 +37,24 @@ import ( func main() { var ( - app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for AWS").DefaultEnvars() + app = kingpin.New(filepath.Base(os.Args[0]), "AWS support for Crossplane.").DefaultEnvars() debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() - syncPeriod = app.Flag("sync", "Controller manager sync period such as 300ms, 1.5h, or 2h45m").Short('s').Default("1h").Duration() + syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration() + pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() - terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() - providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() - providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() - maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int() + pluginProcessTTL = app.Flag("provider-ttl", "TTL for the native plugin processes before they are replaced. Changing the default may increase memory consumption.").Default("100").Int() namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String() enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool() - enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("false").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() + essTLSCertsPath = app.Flag("ess-tls-cert-dir", "Path of ESS TLS certificates.").Envar("ESS_TLS_CERTS_DIR").String() + enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() ) + setupConfig := &clients.SetupConfig{} + setupConfig.TerraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() + setupConfig.NativeProviderSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() + setupConfig.NativeProviderVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + setupConfig.NativeProviderPath = app.Flag("terraform-native-provider-path", "Terraform native provider path for shared execution.").Default("").Envar("TERRAFORM_NATIVE_PROVIDER_PATH").String() kingpin.MustParse(app.Parse(os.Args[1:])) @@ -59,41 +67,80 @@ func main() { ctrl.SetLogger(zl) } - log.Debug("Starting", "sync-period", syncPeriod.String()) + // currently, we configure the jitter to be the 5% of the poll interval + pollJitter := time.Duration(float64(*pollInterval) * 0.05) + log.Debug("Starting", "sync-interval", syncInterval.String(), + "poll-interval", pollInterval.String(), "poll-jitter", pollJitter, "max-reconcile-rate", *maxReconcileRate) cfg, err := ctrl.GetConfig() kingpin.FatalIfError(err, "Cannot get API server rest config") - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - LeaderElection: *leaderElection, - LeaderElectionID: "crossplane-leader-election-provider-aws", - SyncPeriod: syncPeriod, + mgr, err := ctrl.NewManager(ratelimiter.LimitRESTConfig(cfg, *maxReconcileRate), ctrl.Options{ + LeaderElection: *leaderElection, + LeaderElectionID: "crossplane-leader-election-provider-aws-accessanalyzer", + Cache: cache.Options{ + SyncPeriod: syncInterval, + }, LeaderElectionResourceLock: resourcelock.LeasesResourceLock, LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), }) kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") + + // if the native Terraform provider plugin's path is not configured via + // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or + // the `--terraform-native-provider-path` command-line option, + // we do not use the shared gRPC server and default to the regular + // Terraform CLI behaviour (of forking a plugin process per invocation). + // This removes some complexity for setting up development environments. + setupConfig.DefaultScheduler = terraform.NewNoOpProviderScheduler() + if len(*setupConfig.NativeProviderPath) != 0 { + setupConfig.DefaultScheduler = terraform.NewSharedProviderScheduler(log, *pluginProcessTTL, + terraform.WithSharedProviderOptions(terraform.WithNativeProviderPath(*setupConfig.NativeProviderPath), terraform.WithNativeProviderName("registry.terraform.io/"+*setupConfig.NativeProviderSource))) + } + + ctx := context.Background() + provider, err := config.GetProvider(ctx, false) + kingpin.FatalIfError(err, "Cannot initialize the provider configuration") + setupConfig.TerraformProvider = provider.TerraformProvider o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, GlobalRateLimiter: ratelimiter.NewGlobal(*maxReconcileRate), - PollInterval: 1 * time.Minute, - MaxConcurrentReconciles: 1, + PollInterval: *pollInterval, + MaxConcurrentReconciles: *maxReconcileRate, + Features: &feature.Flags{}, }, - Provider: config.GetProvider(), - // use the following WorkspaceStoreOption to enable the shared gRPC mode - // terraform.WithProviderRunner(terraform.NewSharedProvider(log, os.Getenv("TERRAFORM_NATIVE_PROVIDER_PATH"), terraform.WithNativeProviderArgs("-debuggable"))) - WorkspaceStore: terraform.NewWorkspaceStore(log), - SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion), + Provider: provider, + SetupFn: clients.SelectTerraformSetup(log, setupConfig), + PollJitter: pollJitter, + OperationTrackerStore: tjcontroller.NewOperationStore(log), } + if *enableManagementPolicies { + o.Features.Enable(features.EnableBetaManagementPolicies) + log.Info("Beta feature enabled", "flag", features.EnableBetaManagementPolicies) + } + + o.WorkspaceStore = terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval), terraform.WithFeatures(o.Features)) + if *enableExternalSecretStores { o.SecretStoreConfigGVK = &v1alpha1.StoreConfigGroupVersionKind log.Info("Alpha feature enabled", "flag", features.EnableAlphaExternalSecretStores) + o.ESSOptions = &tjcontroller.ESSOptions{} + if *essTLSCertsPath != "" { + log.Info("ESS TLS certificates path is set. Loading mTLS configuration.") + tCfg, err := certificates.LoadMTLSConfig(filepath.Join(*essTLSCertsPath, "ca.crt"), filepath.Join(*essTLSCertsPath, "tls.crt"), filepath.Join(*essTLSCertsPath, "tls.key"), false) + kingpin.FatalIfError(err, "Cannot load ESS TLS config.") + + o.ESSOptions.TLSConfig = tCfg + } + // Ensure default store config exists. - kingpin.FatalIfError(resource.Ignore(kerrors.IsAlreadyExists, mgr.GetClient().Create(context.Background(), &v1alpha1.StoreConfig{ + kingpin.FatalIfError(resource.Ignore(kerrors.IsAlreadyExists, mgr.GetClient().Create(ctx, &v1alpha1.StoreConfig{ + TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "default", }, @@ -104,14 +151,10 @@ func main() { DefaultScope: *namespace, }, }, + Status: v1alpha1.StoreConfigStatus{}, })), "cannot create default store config") } - if *enableManagementPolicies { - o.Features.Enable(features.EnableAlphaManagementPolicies) - log.Info("Alpha feature enabled", "flag", features.EnableAlphaManagementPolicies) - } - - kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup AWS controllers") + kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup Aws controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/config/common/config.go b/config/common/config.go index cf1a79a..ad8d1c8 100644 --- a/config/common/config.go +++ b/config/common/config.go @@ -8,12 +8,12 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/fieldpath" "github.com/crossplane/crossplane-runtime/pkg/reference" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/upbound/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource" ) const ( // SelfPackagePath is the golang path for this package. - SelfPackagePath = "github.com/upbound/provider-aws/config/common" + SelfPackagePath = "kubedb.dev/provider-aws/config/common" // PathARNExtractor is the golang path to ARNExtractor function // in this package. @@ -23,9 +23,9 @@ const ( // function in this package. PathTerraformIDExtractor = SelfPackagePath + ".TerraformID()" - // VersionV1Beta1 is used for resources that meet the v1beta1 criteria + // VersionV1Alpha1 is used for resources that meet the v1alpha1 criteria // here: https://github.com/upbound/arch/pull/33 - VersionV1Beta1 = "v1beta1" + VersionV1Alpha1 = "v1alpha1" ) // ARNExtractor extracts ARN of the resources from "status.atProvider.arn" which diff --git a/config/docdb/config.go b/config/docdb/config.go index a459f44..255e98a 100644 --- a/config/docdb/config.go +++ b/config/docdb/config.go @@ -1,6 +1,6 @@ package docdb -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure adds configurations for docdb group. func Configure(p *config.Provider) { @@ -18,7 +18,7 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_docdb_subnet_group", func(r *config.Resource) { r.References["subnet_ids"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet", + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet", } }) } diff --git a/config/dynamodb/config.go b/config/dynamodb/config.go index 074dfe0..4c8cd9c 100644 --- a/config/dynamodb/config.go +++ b/config/dynamodb/config.go @@ -5,7 +5,7 @@ Copyright 2022 Upbound Inc. package dynamodb import ( - "github.com/upbound/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config" "kubedb.dev/provider-aws/config/common" ) diff --git a/config/ec2/config.go b/config/ec2/config.go index e3370e6..3b0b334 100644 --- a/config/ec2/config.go +++ b/config/ec2/config.go @@ -1,6 +1,6 @@ package ec2 -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { @@ -12,4 +12,15 @@ func Configure(p *config.Provider) { r.UseAsync = true r.ShortGroup = "ec2" }) + + p.AddResourceConfigurator("aws_subnet", func(r *config.Resource) { + r.LateInitializer = config.LateInitializer{ + // NOTE(muvaf): Conflicts with AvailabilityZone. See the following + // for more details: https://github.com/crossplane/upjet/issues/107 + IgnoredFields: []string{ + "availability_zone_id", + }, + } + r.UseAsync = true + }) } diff --git a/config/elasticache/config.go b/config/elasticache/config.go index a13ce5f..b6ad6e2 100644 --- a/config/elasticache/config.go +++ b/config/elasticache/config.go @@ -5,7 +5,7 @@ Copyright 2021 Upbound Inc. package elasticache import ( - "github.com/upbound/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config" ) // Configure adds configurations for elasticache group. @@ -24,7 +24,7 @@ func Configure(p *config.Provider) { Type: "SubnetGroup", } r.References["kms_key_id"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key", + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", } r.LateInitializer = config.LateInitializer{ // Conflicting configuration arguments: "number_cache_clusters": conflicts with cluster_mode.0.num_node_groups diff --git a/config/external_name.go b/config/external_name.go index 128154c..1b9b382 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -7,8 +7,9 @@ package config import ( "context" "fmt" + "github.com/crossplane/upjet/pkg/config" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/config" + "kubedb.dev/provider-aws/config/common" "strings" ) @@ -56,6 +57,8 @@ func FormattedIdentifierFromProvider(separator string, keys ...string) config.Ex return e } +var CLIReconciledExternalNameConfigs = map[string]config.ExternalName{} + // ExternalNameConfigs contains all external name configurations for this // provider. var ExternalNameConfigs = map[string]config.ExternalName{ @@ -64,6 +67,20 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "aws_security_group_rule": config.IdentifierFromProvider, "aws_route": route(), + "aws_security_group": config.IdentifierFromProvider, + /// iam + "aws_iam_role": config.NameAsIdentifier, + "aws_secretsmanager_secret": config.IdentifierFromProvider, + + //vpc + // + // Imported using the id: vpc-23123 + "aws_vpc": config.IdentifierFromProvider, + // Imported using the vpc endpoint id: vpce-3ecf2a57 + "aws_vpc_endpoint": config.IdentifierFromProvider, + // Imported using the subnet id: subnet-9d4a7b6c + "aws_subnet": config.IdentifierFromProvider, + // docdb // // DocDB Clusters can be imported using the cluster_identifier @@ -83,10 +100,10 @@ var ExternalNameConfigs = map[string]config.ExternalName{ // dynamodb // + "aws_dynamodb_table": config.NameAsIdentifier, // DynamoDB table replicas can be imported using the table-name:main-region "aws_dynamodb_table_replica": config.IdentifierFromProvider, - // DynamoDB tables can be imported using the name - "aws_dynamodb_table": config.NameAsIdentifier, + // DynamoDB Global Tables can be imported using the global table name "aws_dynamodb_global_table": config.NameAsIdentifier, // aws_dynamodb_tag can be imported by using the DynamoDB resource identifier and key, separated by a comma (,) @@ -158,7 +175,7 @@ var ExternalNameConfigs = map[string]config.ExternalName{ // RDS DB Proxy Targets can be imported using the db_proxy_name, target_group_name, target type (e.g., RDS_INSTANCE or TRACKED_CLUSTER), and resource identifier separated by forward slashes (/) "aws_db_proxy_target": config.IdentifierFromProvider, // NOTE(turkenf): The resource aws_db_security_group is deprecated, - // Please see: https://github.com/upbound/provider-aws/issues/696 + // Please see: https://kubedb.dev/provider-aws/issues/696 // aws_db_snapshot can be imported by using the snapshot identifier "aws_db_snapshot": config.ParameterAsIdentifier("db_snapshot_identifier"), // RDS Aurora Cluster Database Activity Streams can be imported using the resource_arn @@ -192,26 +209,46 @@ var ExternalNameConfigs = map[string]config.ExternalName{ // // Even though the documentation says the ID is name, it uses ARN.. "aws_kinesis_stream": config.TemplatedStringAsIdentifier("name", " arn:aws:kinesis:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:stream/{{ .external_name }}"), + // sns + // + // SNS Topics can be imported using the topic arn + "aws_sns_topic": config.TemplatedStringAsIdentifier("name", "arn:aws:sns:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:{{ .external_name }}"), } // ExternalNameConfigurations applies all external name configs listed in the -// table ExternalNameConfigs and sets the version of those resources to v1beta1 +// table ExternalNameConfigs and sets the version of those resources to v1alpha1 // assuming they will be tested. func ExternalNameConfigurations() config.ResourceOption { return func(r *config.Resource) { if e, ok := ExternalNameConfigs[r.Name]; ok { + r.Version = common.VersionV1Alpha1 r.ExternalName = e } } } -// ExternalNameConfigured returns the list of all resources whose external name -// is configured manually. -func ExternalNameConfigured() []string { +// NoForkResourceList returns the list of resources that have external +// name configured in ExternalNameConfigs table and to be reconciled under +// the no-fork architecture. +func NoForkResourceList() []string { l := make([]string, len(ExternalNameConfigs)) i := 0 for name := range ExternalNameConfigs { - // $ is added to match the exact string since the format is regex. + // Expected format is regex and we'd like to have exact matches. + l[i] = name + "$" + i++ + } + return l +} + +// CLIReconciledResourceList returns the list of resources that have external +// name configured in ExternalNameConfigs table and to be reconciled under +// the TF CLI based architecture. +func CLIReconciledResourceList() []string { + l := make([]string, len(CLIReconciledExternalNameConfigs)) + i := 0 + for name := range CLIReconciledExternalNameConfigs { + // Expected format is regex and we'd like to have exact matches. l[i] = name + "$" i++ } diff --git a/config/groups.go b/config/groups.go deleted file mode 100644 index c026637..0000000 --- a/config/groups.go +++ /dev/null @@ -1,20 +0,0 @@ -package config - -import ( - "github.com/upbound/upjet/pkg/config" -) - -var KindMap = map[string]string{ - "aws_security_group_rule": "SecurityGroupRule", - "aws_vpc_peering_connection": "VPCPeeringConnection", - "aws_rote": "Route", -} - -// KindOverrides overrides the kind of the resources given in KindMap. -func KindOverrides() config.ResourceOption { - return func(r *config.Resource) { - if k, ok := KindMap[r.Name]; ok { - r.Kind = k - } - } -} diff --git a/config/iam/config.go b/config/iam/config.go new file mode 100644 index 0000000..9c4652e --- /dev/null +++ b/config/iam/config.go @@ -0,0 +1,38 @@ +/* +Copyright 2021 Upbound Inc. +*/ + +package iam + +import ( + "github.com/crossplane/upjet/pkg/config" +) + +// Configure adds configurations for the iam group. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("aws_iam_access_key", func(r *config.Resource) { + r.References = config.References{ + "user": config.Reference{ + Type: "User", + }, + } + r.Sensitive.AdditionalConnectionDetailsFn = func(attr map[string]any) (map[string][]byte, error) { + conn := map[string][]byte{} + if a, ok := attr["id"].(string); ok { + conn["username"] = []byte(a) + } + if a, ok := attr["secret"].(string); ok { + conn["password"] = []byte(a) + } + return conn, nil + } + }) + + p.AddResourceConfigurator("aws_iam_role", func(r *config.Resource) { + r.MetaResource.ArgumentDocs["inline_policy"] = `Configuration block defining an exclusive set of IAM inline policies associated with the IAM role. See below. If no blocks are configured, Crossplane will not manage any inline policies in this resource. Configuring one empty block (i.e., inline_policy {}) will cause Crossplane to remove all inline policies added out of band on apply.` + r.MetaResource.ArgumentDocs["managed_policy_arns"] = `Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is not configured, Crossplane will ignore policy attachments to this resource. When configured, Crossplane will align the role's managed policy attachments with this set by attaching or detaching managed policies. Configuring an empty set (i.e., managed_policy_arns = []) will cause Crossplane to remove all managed policy attachments.` + r.LateInitializer = config.LateInitializer{ + IgnoredFields: []string{"managed_policy_arns"}, + } + }) +} diff --git a/config/kafka/config.go b/config/kafka/config.go index 1857bf8..9db8ed8 100644 --- a/config/kafka/config.go +++ b/config/kafka/config.go @@ -1,7 +1,7 @@ package kafka import ( - "github.com/upbound/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config" "kubedb.dev/provider-aws/config/common" ) @@ -10,20 +10,20 @@ import ( func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_msk_cluster", func(r *config.Resource) { r.References["encryption_info.encryption_at_rest_kms_key_arn"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key", + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", Extractor: common.PathARNExtractor, } - r.References["logging_info.broker_logs.s3.bucket"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket", - } - r.References["logging_info.broker_logs.cloudwatch_logs.log_group"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/cloudwatchlogs/v1beta1.Group", - } + /*r.References["logging_info.broker_logs.s3.bucket"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/s3/v1alpha1.Bucket", + }*/ + /*r.References["logging_info.broker_logs.cloudwatch_logs.log_group"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/cloudwatchlogs/v1alpha1.Group", + }*/ r.References["broker_node_group_info.client_subnets"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet", + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet", } r.References["broker_node_group_info.security_groups"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup", } r.UseAsync = true }) diff --git a/config/kinesis/config.go b/config/kinesis/config.go index 511b0da..b190b05 100644 --- a/config/kinesis/config.go +++ b/config/kinesis/config.go @@ -1,7 +1,7 @@ package kinesis import ( - "github.com/upbound/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config" ) // Configure adds configurations for kinesis group. diff --git a/config/memorydb/config.go b/config/memorydb/config.go index 7c88cd4..3afdc75 100644 --- a/config/memorydb/config.go +++ b/config/memorydb/config.go @@ -7,7 +7,7 @@ package memorydb import ( "fmt" - "github.com/upbound/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config" ) // Configure adds configurations for memorydb group. diff --git a/config/overrides.go b/config/overrides.go index 51cc237..7bbfe81 100644 --- a/config/overrides.go +++ b/config/overrides.go @@ -1,10 +1,12 @@ package config import ( + "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/types/comments" + "github.com/crossplane/upjet/pkg/types/name" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/config" - "github.com/upbound/upjet/pkg/types/comments" + "kubedb.dev/provider-aws/config/common" "strings" ) @@ -12,7 +14,14 @@ var ( resourceGroup = map[string]string{ "aws_security_group_rule": "ec2", "aws_vpc_peering_connection": "ec2", - "aws_rote": "ec2", + "aws_route": "ec2", + "aws_vpc": "ec2", + "aws_vpc_endpoint": "ec2", + "aws_subnet": "ec2", + "aws_security_group": "ec2", + "aws_iam_role": "iam", + "aws_secretsmanager_secret": "secretsmanager", + "aws_sns_topic": "sns", "aws_docdb_cluster": "docdb", "aws_docdb_global_cluster": "docdb", @@ -78,7 +87,14 @@ var ( resourceKind = map[string]string{ "aws_security_group_rule": "SecurityGroupRule", "aws_vpc_peering_connection": "VPCPeeringConnection", - "aws_rote": "Route", + "aws_route": "Route", + "aws_vpc": "VPC", + "aws_vpc_endpoint": "VPCEndpoint", + "aws_subnet": "Subnet", + "aws_security_group": "SecurityGroup", + "aws_iam_role": "Role", + "aws_secretsmanager_secret": "Secret", + "aws_sns_topic": "Topic", "aws_docdb_cluster": "Cluster", "aws_docdb_global_cluster": "GlobalCluster", @@ -188,3 +204,63 @@ func RegionAddition() config.ResourceOption { } } } + +// KnownReferencers adds referencers for fields that are known and common among +// more than a few resources. +func KnownReferencers() config.ResourceOption { //nolint:gocyclo + return func(r *config.Resource) { + for k, s := range r.TerraformResource.Schema { + // We shouldn't add referencers for status fields and sensitive fields + // since they already have secret referencer. + if (s.Computed && !s.Optional) || s.Sensitive { + continue + } + switch { + case strings.HasSuffix(k, "role_arn"): + r.References[k] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/iam/v1alpha1.Role", + Extractor: common.PathARNExtractor, + } + case strings.HasSuffix(k, "security_group_ids"): + r.References[k] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup", + RefFieldName: name.NewFromSnake(strings.TrimSuffix(k, "s")).Camel + "Refs", + SelectorFieldName: name.NewFromSnake(strings.TrimSuffix(k, "s")).Camel + "Selector", + } + + } + switch k { + case "vpc_id": + r.References["vpc_id"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.VPC", + } + case "subnet_ids": + r.References["subnet_ids"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet", + RefFieldName: "SubnetIDRefs", + SelectorFieldName: "SubnetIDSelector", + } + case "subnet_id": + r.References["subnet_id"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.Subnet", + } + case "security_group_id": + r.References["security_group_id"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup", + } + case "kms_key_id": + r.References["kms_key_id"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", + } + case "kms_key_arn": + r.References["kms_key_arn"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", + } + case "kms_key": + r.References["kms_key"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", + } + } + } + } +} diff --git a/config/provider-metadata.yaml b/config/provider-metadata.yaml index 68acd97..0fa13df 100644 --- a/config/provider-metadata.yaml +++ b/config/provider-metadata.yaml @@ -33840,11 +33840,40 @@ resources: id: '- GuardDuty member detector ID' master_account_id: '- (Required) AWS account ID for primary account.' importStatements: [] - aws_guardduty_ipset': + aws_guardduty_ipset: subCategory: GuardDuty description: Provides a resource to manage a GuardDuty IPSet - name: aws_guardduty_ipset' + name: aws_guardduty_ipset title: aws_guardduty_ipset' + examples: + - name: example + manifest: |- + { + "activate": true, + "detector_id": "${aws_guardduty_detector.primary.id}", + "format": "TXT", + "location": "https://s3.amazonaws.com/${aws_s3_object.MyIPSet.bucket}/${aws_s3_object.MyIPSet.key}", + "name": "MyIPSet" + } + references: + detector_id: aws_guardduty_detector.primary.id + dependencies: + aws_guardduty_detector.primary: |- + { + "enable": true + } + aws_s3_bucket.bucket: '{}' + aws_s3_bucket_acl.bucket_acl: |- + { + "acl": "private", + "bucket": "${aws_s3_bucket.bucket.id}" + } + aws_s3_object.MyIPSet: |- + { + "bucket": "${aws_s3_bucket.bucket.id}", + "content": "10.0.0.0/8\n", + "key": "MyIPSet" + } argumentDocs: activate: '- (Required) Specifies whether GuardDuty is to start using the uploaded IPSet.' arn: '- Amazon Resource Name (ARN) of the GuardDuty IPSet.' @@ -33999,11 +34028,52 @@ resources: s3_logs: '- (Optional) Enable S3 Protection automatically for new member accounts.' s3_logs.auto_enable: '- (Optional) Set to true if you want S3 data event logs to be automatically enabled for new members of the organization. Default: false' importStatements: [] - aws_guardduty_publishing_destination': + aws_guardduty_publishing_destination: subCategory: GuardDuty description: Provides a resource to manage a GuardDuty PublishingDestination - name: aws_guardduty_publishing_destination' + name: aws_guardduty_publishing_destination title: aws_guardduty_publishing_destination' + examples: + - name: test + manifest: |- + { + "depends_on": [ + "${aws_s3_bucket_policy.gd_bucket_policy}" + ], + "destination_arn": "${aws_s3_bucket.gd_bucket.arn}", + "detector_id": "${aws_guardduty_detector.test_gd.id}", + "kms_key_arn": "${aws_kms_key.gd_key.arn}" + } + references: + destination_arn: aws_s3_bucket.gd_bucket.arn + detector_id: aws_guardduty_detector.test_gd.id + kms_key_arn: aws_kms_key.gd_key.arn + dependencies: + aws_guardduty_detector.test_gd: |- + { + "enable": true + } + aws_kms_key.gd_key: |- + { + "deletion_window_in_days": 7, + "description": "Temporary key for AccTest of TF", + "policy": "${data.aws_iam_policy_document.kms_pol.json}" + } + aws_s3_bucket.gd_bucket: |- + { + "bucket": "example", + "force_destroy": true + } + aws_s3_bucket_acl.gd_bucket_acl: |- + { + "acl": "private", + "bucket": "${aws_s3_bucket.gd_bucket.id}" + } + aws_s3_bucket_policy.gd_bucket_policy: |- + { + "bucket": "${aws_s3_bucket.gd_bucket.id}", + "policy": "${data.aws_iam_policy_document.bucket_pol.json}" + } argumentDocs: destination_arn: '- (Required) The bucket arn and prefix under which the findings get exported. Bucket-ARN is required, the prefix is optional and will be AWSLogs/[Account-ID]/GuardDuty/[Region]/ if not provided' destination_type: '- (Optional) Currently there is only "S3" available as destination type which is also the default value' @@ -34011,11 +34081,41 @@ resources: id: '- The ID of the GuardDuty PublishingDestination and the detector ID. Format: :' kms_key_arn: '- (Required) The ARN of the KMS key used to encrypt GuardDuty findings. GuardDuty enforces this to be encrypted.' importStatements: [] - aws_guardduty_threatintelset': + aws_guardduty_threatintelset: subCategory: GuardDuty description: Provides a resource to manage a GuardDuty ThreatIntelSet - name: aws_guardduty_threatintelset' + name: aws_guardduty_threatintelset title: aws_guardduty_threatintelset' + examples: + - name: MyThreatIntelSet + manifest: |- + { + "activate": true, + "detector_id": "${aws_guardduty_detector.primary.id}", + "format": "TXT", + "location": "https://s3.amazonaws.com/${aws_s3_object.MyThreatIntelSet.bucket}/${aws_s3_object.MyThreatIntelSet.key}", + "name": "MyThreatIntelSet" + } + references: + detector_id: aws_guardduty_detector.primary.id + dependencies: + aws_guardduty_detector.primary: |- + { + "enable": true + } + aws_s3_bucket.bucket: '{}' + aws_s3_bucket_acl.bucket_acl: |- + { + "acl": "private", + "bucket": "${aws_s3_bucket.bucket.id}" + } + aws_s3_object.MyThreatIntelSet: |- + { + "acl": "public-read", + "bucket": "${aws_s3_bucket.bucket.id}", + "content": "10.0.0.0/8\n", + "key": "MyThreatIntelSet" + } argumentDocs: activate: '- (Required) Specifies whether GuardDuty is to start using the uploaded ThreatIntelSet.' arn: '- Amazon Resource Name (ARN) of the GuardDuty ThreatIntelSet.' diff --git a/config/provider.go b/config/provider.go index 7a0fa3c..3e7c491 100644 --- a/config/provider.go +++ b/config/provider.go @@ -5,17 +5,28 @@ Copyright 2021 Upbound Inc. package config import ( + "context" + tfjson "github.com/hashicorp/terraform-json" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/pkg/errors" + // Note(turkenh): we are importing this to embed provider schema document _ "embed" - ujconfig "github.com/upbound/upjet/pkg/config" + ujconfig "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/registry/reference" + conversiontfjson "github.com/crossplane/upjet/pkg/types/conversion/tfjson" + "github.com/hashicorp/terraform-provider-aws/xpprovider" "kubedb.dev/provider-aws/config/docdb" "kubedb.dev/provider-aws/config/dynamodb" "kubedb.dev/provider-aws/config/ec2" "kubedb.dev/provider-aws/config/elasticache" + "kubedb.dev/provider-aws/config/iam" "kubedb.dev/provider-aws/config/kafka" "kubedb.dev/provider-aws/config/kinesis" "kubedb.dev/provider-aws/config/memorydb" "kubedb.dev/provider-aws/config/rds" + "kubedb.dev/provider-aws/config/secretsmanager" + "kubedb.dev/provider-aws/config/sns" ) const ( @@ -23,21 +34,58 @@ const ( modulePath = "kubedb.dev/provider-aws" ) -//go:embed schema.json -var providerSchema string +var ( + //go:embed schema.json + providerSchema string -//go:embed provider-metadata.yaml -var providerMetadata string + //go:embed provider-metadata.yaml + providerMetadata string +) + +// workaround for the TF AWS v4.67.0-based no-fork release: We would like to +// keep the types in the generated CRDs intact +// (prevent number->int type replacements). +func getProviderSchema(s string) (*schema.Provider, error) { + ps := tfjson.ProviderSchemas{} + if err := ps.UnmarshalJSON([]byte(s)); err != nil { + panic(err) + } + if len(ps.Schemas) != 1 { + return nil, errors.Errorf("there should exactly be 1 provider schema but there are %d", len(ps.Schemas)) + } + var rs map[string]*tfjson.Schema + for _, v := range ps.Schemas { + rs = v.ResourceSchemas + break + } + return &schema.Provider{ + ResourcesMap: conversiontfjson.GetV2ResourceMap(rs), + }, nil +} // GetProvider returns provider configuration -func GetProvider() *ujconfig.Provider { +func GetProvider(ctx context.Context, generationProvider bool) (*ujconfig.Provider, error) { + var p *schema.Provider + var err error + if generationProvider { + p, err = getProviderSchema(providerSchema) + } else { + p, err = xpprovider.GetProviderSchema(ctx) + } + if err != nil { + return nil, errors.Wrapf(err, "cannot get the Terraform provider schema with generation mode set to %t", generationProvider) + } pc := ujconfig.NewProvider([]byte(providerSchema), resourcePrefix, modulePath, []byte(providerMetadata), - ujconfig.WithIncludeList(ExternalNameConfigured()), + ujconfig.WithIncludeList(CLIReconciledResourceList()), + ujconfig.WithNoForkIncludeList(NoForkResourceList()), ujconfig.WithRootGroup("aws.kubedb.com"), ujconfig.WithFeaturesPackage("internal/features"), + ujconfig.WithReferenceInjectors([]ujconfig.ReferenceInjector{reference.NewInjector(modulePath)}), + ujconfig.WithTerraformProvider(p), ujconfig.WithDefaultResourceOptions( - ExternalNameConfigurations(), RegionAddition(), + KnownReferencers(), + ExternalNameConfigurations(), )) // API group overrides from Terraform import statements @@ -55,10 +103,13 @@ func GetProvider() *ujconfig.Provider { memorydb.Configure, rds.Configure, kinesis.Configure, + iam.Configure, + secretsmanager.Configure, + sns.Configure, } { configure(pc) } pc.ConfigureResources() - return pc + return pc, nil } diff --git a/config/rds/config.go b/config/rds/config.go index 49b0734..31f3c11 100644 --- a/config/rds/config.go +++ b/config/rds/config.go @@ -20,8 +20,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/upbound/upjet/pkg/config" - "github.com/upbound/upjet/pkg/types/comments" + "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/types/comments" "kubedb.dev/provider-aws/config/common" ) @@ -35,9 +35,6 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_rds_cluster", func(r *config.Resource) { // Mutually exclusive with aws_rds_cluster_role_association config.MoveToStatus(r.TerraformResource, "iam_roles") - r.References["s3_import.bucket_name"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket", - } r.References["restore_to_point_in_time.source_cluster_identifier"] = config.Reference{ Type: "Cluster", } @@ -67,20 +64,17 @@ func Configure(p *config.Provider) { r.References["restore_to_point_in_time.source_db_instance_identifier"] = config.Reference{ Type: "Instance", } - r.References["s3_import.bucket_name"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket", - } r.References["kms_key_id"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key", + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", } r.References["performance_insights_kms_key_id"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key", + Type: "kubedb.dev/provider-aws/apis/kms/v1alpha1.Key", } r.References["restore_to_point_in_time.source_cluster_identifier"] = config.Reference{ Type: "Cluster", } r.References["security_group_names"] = config.Reference{ - Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", + Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup", RefFieldName: "SecurityGroupNameRefs", SelectorFieldName: "SecurityGroupNameSelector", } @@ -143,8 +137,8 @@ func Configure(p *config.Provider) { "master DB user. If you set autoGeneratePassword to true, the Secret" + " referenced here will be created or updated with generated password" + " if it does not already contain one." - r.MetaResource.ArgumentDocs["engine"] = "- (Required unless a `snapshotIdentifier` or `replicateSourceDb` is provided) The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html)." - r.MetaResource.ArgumentDocs["engine_version"] = "- (Optional) The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s engine version'." + r.MetaResource.ArgumentDocs["engine"] = "- (Required unless a `snapshotIdentifier` or `replicateSourceDb` is provided) The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html)." + r.MetaResource.ArgumentDocs["engine_version"] = "- (Optional) The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'." }) p.AddResourceConfigurator("aws_db_proxy", func(r *config.Resource) { diff --git a/config/secretsmanager/config.go b/config/secretsmanager/config.go new file mode 100644 index 0000000..6f3f832 --- /dev/null +++ b/config/secretsmanager/config.go @@ -0,0 +1,17 @@ +package secretsmanager + +import "github.com/crossplane/upjet/pkg/config" + +// Configure adds configurations for the secretsmanager group. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("aws_secretsmanager_secret", func(r *config.Resource) { + // Use aws_secretsmanager_secret_rotation. + config.MoveToStatus(r.TerraformResource, "rotation_rules", "rotation_lambda_arn") + // aws_secretsmanager_secret_policy. + config.MoveToStatus(r.TerraformResource, "policy") + // TODO: we had better do this for all resources... + r.TerraformConfigurationInjector = func(_ map[string]any, params map[string]any) { + params["name_prefix"] = "" + } + }) +} diff --git a/config/sns/config.go b/config/sns/config.go new file mode 100644 index 0000000..892ff19 --- /dev/null +++ b/config/sns/config.go @@ -0,0 +1,21 @@ +package sns + +import ( + "github.com/crossplane/upjet/pkg/config" + + "kubedb.dev/provider-aws/config/common" +) + +// Configure adds configurations for the sns group. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("aws_sns_topic_subscription", func(r *config.Resource) { + r.References["endpoint"] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/sqs/v1beta1.Queue", + Extractor: common.PathARNExtractor, + } + r.References["topic_arn"] = config.Reference{ + Type: "Topic", + Extractor: common.PathARNExtractor, + } + }) +} diff --git a/examples-generated/docdb/cluster.yaml b/examples-generated/docdb/cluster.yaml index abd0f12..d6d91aa 100644 --- a/examples-generated/docdb/cluster.yaml +++ b/examples-generated/docdb/cluster.yaml @@ -18,6 +18,3 @@ spec: preferredBackupWindow: 07:00-09:00 region: us-west-1 skipFinalSnapshot: true - ---- - diff --git a/examples-generated/docdb/clusterinstance.yaml b/examples-generated/docdb/clusterinstance.yaml index 7d28c98..c408b77 100644 --- a/examples-generated/docdb/clusterinstance.yaml +++ b/examples-generated/docdb/clusterinstance.yaml @@ -37,6 +37,3 @@ spec: namespace: upbound-system masterUsername: foo region: us-west-1 - ---- - diff --git a/examples-generated/docdb/clusterparametergroup.yaml b/examples-generated/docdb/clusterparametergroup.yaml index 7fffe27..7199d26 100644 --- a/examples-generated/docdb/clusterparametergroup.yaml +++ b/examples-generated/docdb/clusterparametergroup.yaml @@ -14,6 +14,3 @@ spec: - name: tls value: enabled region: us-west-1 - ---- - diff --git a/examples-generated/docdb/clustersnapshot.yaml b/examples-generated/docdb/clustersnapshot.yaml index e29cf9c..2b8f1e5 100644 --- a/examples-generated/docdb/clustersnapshot.yaml +++ b/examples-generated/docdb/clustersnapshot.yaml @@ -8,8 +8,7 @@ metadata: name: example spec: forProvider: - dbClusterIdentifier: ${aws_docdb_cluster.example.id} + dbClusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 - ---- - diff --git a/examples-generated/docdb/eventsubscription.yaml b/examples-generated/docdb/eventsubscription.yaml index 336262b..8b3700a 100644 --- a/examples-generated/docdb/eventsubscription.yaml +++ b/examples-generated/docdb/eventsubscription.yaml @@ -13,7 +13,9 @@ spec: - creation - failure region: us-west-1 - snsTopicArn: ${aws_sns_topic.example.arn} + snsTopicArnSelector: + matchLabels: + testing.upbound.io/example-name: example sourceIds: - ${aws_docdb_cluster.example.id} sourceType: db-cluster @@ -44,3 +46,14 @@ spec: --- +apiVersion: sns.aws.kubedb.com/v1alpha1 +kind: Topic +metadata: + annotations: + meta.upbound.io/example-id: docdb/v1alpha1/eventsubscription + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + region: us-west-1 diff --git a/examples-generated/docdb/globalcluster.yaml b/examples-generated/docdb/globalcluster.yaml index 423ef74..30fda54 100644 --- a/examples-generated/docdb/globalcluster.yaml +++ b/examples-generated/docdb/globalcluster.yaml @@ -95,6 +95,3 @@ spec: instanceClass: db.r5.large provider: ${aws.secondary} region: us-west-1 - ---- - diff --git a/examples-generated/docdb/subnetgroup.yaml b/examples-generated/docdb/subnetgroup.yaml index de0b362..e3c3c73 100644 --- a/examples-generated/docdb/subnetgroup.yaml +++ b/examples-generated/docdb/subnetgroup.yaml @@ -14,6 +14,3 @@ spec: - name: backend tags: Name: My docdb subnet group - ---- - diff --git a/examples-generated/dynamodb/contributorinsights.yaml b/examples-generated/dynamodb/contributorinsights.yaml index 47e4208..fcc875f 100644 --- a/examples-generated/dynamodb/contributorinsights.yaml +++ b/examples-generated/dynamodb/contributorinsights.yaml @@ -12,6 +12,3 @@ spec: tableNameSelector: matchLabels: testing.upbound.io/example-name: example - ---- - diff --git a/examples-generated/dynamodb/globaltable.yaml b/examples-generated/dynamodb/globaltable.yaml index 2a96b44..319c781 100644 --- a/examples-generated/dynamodb/globaltable.yaml +++ b/examples-generated/dynamodb/globaltable.yaml @@ -59,6 +59,3 @@ spec: streamEnabled: true streamViewType: NEW_AND_OLD_IMAGES writeCapacity: 1 - ---- - diff --git a/examples-generated/dynamodb/kinesisstreamingdestination.yaml b/examples-generated/dynamodb/kinesisstreamingdestination.yaml index 3e197a1..9fb1a9f 100644 --- a/examples-generated/dynamodb/kinesisstreamingdestination.yaml +++ b/examples-generated/dynamodb/kinesisstreamingdestination.yaml @@ -48,6 +48,3 @@ spec: forProvider: region: us-west-1 shardCount: 1 - ---- - diff --git a/examples-generated/dynamodb/table.yaml b/examples-generated/dynamodb/table.yaml index acf3289..8b78f10 100644 --- a/examples-generated/dynamodb/table.yaml +++ b/examples-generated/dynamodb/table.yaml @@ -36,6 +36,3 @@ spec: - attributeName: TimeToExist enabled: false writeCapacity: 20 - ---- - diff --git a/examples-generated/dynamodb/tableitem.yaml b/examples-generated/dynamodb/tableitem.yaml index 21d8e6c..c80532b 100644 --- a/examples-generated/dynamodb/tableitem.yaml +++ b/examples-generated/dynamodb/tableitem.yaml @@ -41,6 +41,3 @@ spec: readCapacity: 10 region: us-west-1 writeCapacity: 10 - ---- - diff --git a/examples-generated/dynamodb/tablereplica.yaml b/examples-generated/dynamodb/tablereplica.yaml index df24c3f..d096897 100644 --- a/examples-generated/dynamodb/tablereplica.yaml +++ b/examples-generated/dynamodb/tablereplica.yaml @@ -8,7 +8,9 @@ metadata: name: example spec: forProvider: - globalTableArn: ${aws_dynamodb_table.example.arn} + globalTableArnSelector: + matchLabels: + testing.upbound.io/example-name: example provider: aws.alt region: us-west-1 tags: @@ -36,6 +38,3 @@ spec: region: us-west-1 streamEnabled: true streamViewType: NEW_AND_OLD_IMAGES - ---- - diff --git a/examples-generated/dynamodb/tag.yaml b/examples-generated/dynamodb/tag.yaml index d5730ab..5b6fe41 100644 --- a/examples-generated/dynamodb/tag.yaml +++ b/examples-generated/dynamodb/tag.yaml @@ -30,6 +30,3 @@ spec: region: us-west-1 replica: - regionName: ${data.aws_region.replica.name} - ---- - diff --git a/examples-generated/ec2/route.yaml b/examples-generated/ec2/route.yaml index 0727c89..71e8659 100644 --- a/examples-generated/ec2/route.yaml +++ b/examples-generated/ec2/route.yaml @@ -12,6 +12,3 @@ spec: region: us-west-1 routeTableId: rtb-4fbb3ac4 vpcPeeringConnectionId: pcx-45ff3dc1 - ---- - diff --git a/examples-generated/ec2/securitygroup.yaml b/examples-generated/ec2/securitygroup.yaml new file mode 100644 index 0000000..d9383ee --- /dev/null +++ b/examples-generated/ec2/securitygroup.yaml @@ -0,0 +1,35 @@ +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: SecurityGroup +metadata: + annotations: + meta.upbound.io/example-id: ec2/v1alpha1/securitygroup + labels: + testing.upbound.io/example-name: allow_tls + name: allow-tls +spec: + forProvider: + description: Allow TLS inbound traffic + egress: + - cidrBlocks: + - 0.0.0.0/0 + fromPort: 0 + ipv6CidrBlocks: + - ::/0 + protocol: "-1" + toPort: 0 + ingress: + - cidrBlocks: + - ${aws_vpc.main.cidr_block} + description: TLS from VPC + fromPort: 443 + ipv6CidrBlocks: + - ${aws_vpc.main.ipv6_cidr_block} + protocol: tcp + toPort: 443 + name: allow_tls + region: us-west-1 + tags: + Name: allow_tls + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: main diff --git a/examples-generated/ec2/securitygrouprule.yaml b/examples-generated/ec2/securitygrouprule.yaml index 7b1d6ff..a7c11f5 100644 --- a/examples-generated/ec2/securitygrouprule.yaml +++ b/examples-generated/ec2/securitygrouprule.yaml @@ -15,9 +15,8 @@ spec: - ${aws_vpc.example.ipv6_cidr_block} protocol: tcp region: us-west-1 - securityGroupId: sg-123456 + securityGroupIdSelector: + matchLabels: + testing.upbound.io/example-name: example toPort: 65535 type: ingress - ---- - diff --git a/examples-generated/ec2/subnet.yaml b/examples-generated/ec2/subnet.yaml new file mode 100644 index 0000000..6fff147 --- /dev/null +++ b/examples-generated/ec2/subnet.yaml @@ -0,0 +1,17 @@ +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: ec2/v1alpha1/subnet + labels: + testing.upbound.io/example-name: main + name: main +spec: + forProvider: + cidrBlock: 10.0.1.0/24 + region: us-west-1 + tags: + Name: Main + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: main diff --git a/examples-generated/ec2/vpc.yaml b/examples-generated/ec2/vpc.yaml new file mode 100644 index 0000000..2cbafbc --- /dev/null +++ b/examples-generated/ec2/vpc.yaml @@ -0,0 +1,12 @@ +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + annotations: + meta.upbound.io/example-id: ec2/v1alpha1/vpc + labels: + testing.upbound.io/example-name: main + name: main +spec: + forProvider: + cidrBlock: 10.0.0.0/16 + region: us-west-1 diff --git a/examples-generated/ec2/vpcendpoint.yaml b/examples-generated/ec2/vpcendpoint.yaml new file mode 100644 index 0000000..f002bf9 --- /dev/null +++ b/examples-generated/ec2/vpcendpoint.yaml @@ -0,0 +1,15 @@ +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPCEndpoint +metadata: + annotations: + meta.upbound.io/example-id: ec2/v1alpha1/vpcendpoint + labels: + testing.upbound.io/example-name: s3 + name: s3 +spec: + forProvider: + region: us-west-1 + serviceName: com.amazonaws.us-west-2.s3 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: main diff --git a/examples-generated/ec2/vpcpeeringconnection.yaml b/examples-generated/ec2/vpcpeeringconnection.yaml index c1dd470..a3c3970 100644 --- a/examples-generated/ec2/vpcpeeringconnection.yaml +++ b/examples-generated/ec2/vpcpeeringconnection.yaml @@ -9,9 +9,10 @@ metadata: spec: forProvider: peerOwnerId: ${var.peer_owner_id} - peerVpcId: ${aws_vpc.bar.id} + peerVpcIdSelector: + matchLabels: + testing.upbound.io/example-name: bar region: us-west-1 - vpcId: ${aws_vpc.foo.id} - ---- - + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: foo diff --git a/examples-generated/elasticache/cluster.yaml b/examples-generated/elasticache/cluster.yaml index 3afa440..9787bb4 100644 --- a/examples-generated/elasticache/cluster.yaml +++ b/examples-generated/elasticache/cluster.yaml @@ -16,6 +16,3 @@ spec: testing.upbound.io/example-name: example port: 11211 region: us-west-1 - ---- - diff --git a/examples-generated/elasticache/parametergroup.yaml b/examples-generated/elasticache/parametergroup.yaml index 6a59206..243d3ca 100644 --- a/examples-generated/elasticache/parametergroup.yaml +++ b/examples-generated/elasticache/parametergroup.yaml @@ -16,6 +16,3 @@ spec: - name: min-slaves-to-write value: "2" region: us-west-1 - ---- - diff --git a/examples-generated/elasticache/replicationgroup.yaml b/examples-generated/elasticache/replicationgroup.yaml index 129c097..21ab3b1 100644 --- a/examples-generated/elasticache/replicationgroup.yaml +++ b/examples-generated/elasticache/replicationgroup.yaml @@ -18,6 +18,3 @@ spec: - us-west-2a - us-west-2b region: us-west-1 - ---- - diff --git a/examples-generated/elasticache/subnetgroup.yaml b/examples-generated/elasticache/subnetgroup.yaml index 518e0de..f5493da 100644 --- a/examples-generated/elasticache/subnetgroup.yaml +++ b/examples-generated/elasticache/subnetgroup.yaml @@ -9,8 +9,43 @@ metadata: spec: forProvider: region: us-west-1 - subnetIds: - - ${aws_subnet.foo.id} + subnetIdRefs: + - name: foo --- +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: elasticache/v1alpha1/subnetgroup + labels: + testing.upbound.io/example-name: foo + name: foo +spec: + forProvider: + availabilityZone: us-west-2a + cidrBlock: 10.0.0.0/24 + region: us-west-1 + tags: + Name: tf-test + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: foo + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + annotations: + meta.upbound.io/example-id: elasticache/v1alpha1/subnetgroup + labels: + testing.upbound.io/example-name: foo + name: foo +spec: + forProvider: + cidrBlock: 10.0.0.0/16 + region: us-west-1 + tags: + Name: tf-test diff --git a/examples-generated/elasticache/user.yaml b/examples-generated/elasticache/user.yaml index 500784c..d48fb8b 100644 --- a/examples-generated/elasticache/user.yaml +++ b/examples-generated/elasticache/user.yaml @@ -18,6 +18,3 @@ spec: namespace: upbound-system region: us-west-1 userName: testUserName - ---- - diff --git a/examples-generated/elasticache/usergroup.yaml b/examples-generated/elasticache/usergroup.yaml index ca5fe0d..a973f76 100644 --- a/examples-generated/elasticache/usergroup.yaml +++ b/examples-generated/elasticache/usergroup.yaml @@ -35,6 +35,3 @@ spec: namespace: upbound-system region: us-west-1 userName: default - ---- - diff --git a/examples-generated/elasticsearch/domain.yaml b/examples-generated/elasticsearch/domain.yaml index 118f56d..829a579 100644 --- a/examples-generated/elasticsearch/domain.yaml +++ b/examples-generated/elasticsearch/domain.yaml @@ -14,6 +14,3 @@ spec: region: us-west-1 tags: Domain: TestDomain - ---- - diff --git a/examples-generated/elasticsearch/domainpolicy.yaml b/examples-generated/elasticsearch/domainpolicy.yaml index 4131a74..0da4d2d 100644 --- a/examples-generated/elasticsearch/domainpolicy.yaml +++ b/examples-generated/elasticsearch/domainpolicy.yaml @@ -23,7 +23,9 @@ spec: } ] } - domainName: ${aws_elasticsearch_domain.example.domain_name} + domainNameSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 --- @@ -40,6 +42,3 @@ spec: forProvider: elasticsearchVersion: "2.3" region: us-west-1 - ---- - diff --git a/examples-generated/elasticsearch/domainsamloptions.yaml b/examples-generated/elasticsearch/domainsamloptions.yaml index 5472537..8756786 100644 --- a/examples-generated/elasticsearch/domainsamloptions.yaml +++ b/examples-generated/elasticsearch/domainsamloptions.yaml @@ -35,6 +35,3 @@ spec: - automatedSnapshotStartHour: 23 tags: Domain: TestDomain - ---- - diff --git a/examples-generated/iam/role.yaml b/examples-generated/iam/role.yaml new file mode 100644 index 0000000..be72d0f --- /dev/null +++ b/examples-generated/iam/role.yaml @@ -0,0 +1,26 @@ +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: iam/v1alpha1/role + labels: + testing.upbound.io/example-name: test_role + name: test-role +spec: + forProvider: + assumeRolePolicy: |- + ${jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Action = "sts:AssumeRole" + Effect = "Allow" + Sid = "" + Principal = { + Service = "ec2.amazonaws.com" + } + }, + ] + })} + tags: + tag-key: tag-value diff --git a/examples-generated/kafka/cluster.yaml b/examples-generated/kafka/cluster.yaml index 0d56781..5398cfc 100644 --- a/examples-generated/kafka/cluster.yaml +++ b/examples-generated/kafka/cluster.yaml @@ -29,16 +29,12 @@ spec: - brokerLogs: - cloudwatchLogs: - enabled: true - logGroupSelector: - matchLabels: - testing.upbound.io/example-name: test + logGroup: ${aws_cloudwatch_log_group.test.name} firehose: - deliveryStream: ${aws_kinesis_firehose_delivery_stream.test_stream.name} enabled: true s3: - - bucketSelector: - matchLabels: - testing.upbound.io/example-name: bucket + - bucket: ${aws_s3_bucket.bucket.id} enabled: true prefix: logs/msk- numberOfBrokerNodes: 3 @@ -54,6 +50,20 @@ spec: --- +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: firehose_role + name: firehose-role +spec: + forProvider: + assumeRolePolicy: ${data.aws_iam_policy_document.assume_role.json} + +--- + apiVersion: kms.aws.kubedb.com/v1alpha1 kind: Key metadata: @@ -69,3 +79,89 @@ spec: --- +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: SecurityGroup +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: sg + name: sg +spec: + forProvider: + region: us-west-1 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: subnet_az1 + name: subnet-az1 +spec: + forProvider: + availabilityZone: ${data.aws_availability_zones.azs.names[0]} + cidrBlock: 192.168.0.0/24 + region: us-west-1 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: subnet_az2 + name: subnet-az2 +spec: + forProvider: + availabilityZone: ${data.aws_availability_zones.azs.names[1]} + cidrBlock: 192.168.1.0/24 + region: us-west-1 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: subnet_az3 + name: subnet-az3 +spec: + forProvider: + availabilityZone: ${data.aws_availability_zones.azs.names[2]} + cidrBlock: 192.168.2.0/24 + region: us-west-1 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + annotations: + meta.upbound.io/example-id: kafka/v1alpha1/cluster + labels: + testing.upbound.io/example-name: vpc + name: vpc +spec: + forProvider: + cidrBlock: 192.168.0.0/22 + region: us-west-1 diff --git a/examples-generated/kafka/configuration.yaml b/examples-generated/kafka/configuration.yaml index e4d745d..00a30a0 100644 --- a/examples-generated/kafka/configuration.yaml +++ b/examples-generated/kafka/configuration.yaml @@ -15,6 +15,3 @@ spec: serverProperties: | auto.create.topics.enable = true delete.topic.enable = true - ---- - diff --git a/examples-generated/kinesis/stream.yaml b/examples-generated/kinesis/stream.yaml index febfa4b..25db4df 100644 --- a/examples-generated/kinesis/stream.yaml +++ b/examples-generated/kinesis/stream.yaml @@ -18,6 +18,3 @@ spec: - streamMode: PROVISIONED tags: Environment: test - ---- - diff --git a/examples-generated/kms/key.yaml b/examples-generated/kms/key.yaml index 5f5cd7a..37d0885 100644 --- a/examples-generated/kms/key.yaml +++ b/examples-generated/kms/key.yaml @@ -11,6 +11,3 @@ spec: deletionWindowInDays: 10 description: KMS key 1 region: us-west-1 - ---- - diff --git a/examples-generated/memorydb/acl.yaml b/examples-generated/memorydb/acl.yaml index c3effb0..8ab4401 100644 --- a/examples-generated/memorydb/acl.yaml +++ b/examples-generated/memorydb/acl.yaml @@ -12,6 +12,3 @@ spec: userNames: - my-user-1 - my-user-2 - ---- - diff --git a/examples-generated/memorydb/cluster.yaml b/examples-generated/memorydb/cluster.yaml index 5ba08b1..357a032 100644 --- a/examples-generated/memorydb/cluster.yaml +++ b/examples-generated/memorydb/cluster.yaml @@ -12,10 +12,9 @@ spec: nodeType: db.t4g.small numShards: 2 region: us-west-1 - securityGroupIds: - - ${aws_security_group.example.id} + securityGroupIdRefs: + - name: example snapshotRetentionLimit: 7 - subnetGroupName: ${aws_memorydb_subnet_group.example.id} - ---- - + subnetGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples-generated/memorydb/parametergroup.yaml b/examples-generated/memorydb/parametergroup.yaml index 8e5b9e1..b240bb1 100644 --- a/examples-generated/memorydb/parametergroup.yaml +++ b/examples-generated/memorydb/parametergroup.yaml @@ -13,6 +13,3 @@ spec: - name: activedefrag value: "yes" region: us-west-1 - ---- - diff --git a/examples-generated/memorydb/snapshot.yaml b/examples-generated/memorydb/snapshot.yaml index 6d22d7e..d37635c 100644 --- a/examples-generated/memorydb/snapshot.yaml +++ b/examples-generated/memorydb/snapshot.yaml @@ -8,8 +8,7 @@ metadata: name: example spec: forProvider: - clusterName: ${aws_memorydb_cluster.example.name} + clusterNameSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 - ---- - diff --git a/examples-generated/memorydb/subnetgroup.yaml b/examples-generated/memorydb/subnetgroup.yaml index a826c20..40b354b 100644 --- a/examples-generated/memorydb/subnetgroup.yaml +++ b/examples-generated/memorydb/subnetgroup.yaml @@ -9,8 +9,39 @@ metadata: spec: forProvider: region: us-west-1 - subnetIds: - - ${aws_subnet.example.id} + subnetIdRefs: + - name: example --- +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: memorydb/v1alpha1/subnetgroup + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + availabilityZone: us-west-2a + cidrBlock: 10.0.0.0/24 + region: us-west-1 + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + annotations: + meta.upbound.io/example-id: memorydb/v1alpha1/subnetgroup + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + cidrBlock: 10.0.0.0/16 + region: us-west-1 diff --git a/examples-generated/rds/cluster.yaml b/examples-generated/rds/cluster.yaml index 7c39a3b..37c3836 100644 --- a/examples-generated/rds/cluster.yaml +++ b/examples-generated/rds/cluster.yaml @@ -23,6 +23,3 @@ spec: masterUsername: foo preferredBackupWindow: 07:00-09:00 region: us-west-1 - ---- - diff --git a/examples-generated/rds/clusteractivitystream.yaml b/examples-generated/rds/clusteractivitystream.yaml index 0c3a0b9..4560f4a 100644 --- a/examples-generated/rds/clusteractivitystream.yaml +++ b/examples-generated/rds/clusteractivitystream.yaml @@ -8,10 +8,14 @@ metadata: name: default spec: forProvider: - kmsKeyId: ${aws_kms_key.default.key_id} + kmsKeyIdSelector: + matchLabels: + testing.upbound.io/example-name: default mode: async region: us-west-1 - resourceArn: ${aws_rds_cluster.default.arn} + resourceArnSelector: + matchLabels: + testing.upbound.io/example-name: default --- @@ -66,10 +70,9 @@ metadata: name: default spec: forProvider: - clusterIdentifier: aurora-cluster-demo + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default engine: aurora-postgresql instanceClass: db.r6g.large region: us-west-1 - ---- - diff --git a/examples-generated/rds/clusterendpoint.yaml b/examples-generated/rds/clusterendpoint.yaml index d55f181..c3ff357 100644 --- a/examples-generated/rds/clusterendpoint.yaml +++ b/examples-generated/rds/clusterendpoint.yaml @@ -8,7 +8,9 @@ metadata: name: eligible spec: forProvider: - clusterIdentifier: ${aws_rds_cluster.default.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default customEndpointType: READER excludedMembers: - ${aws_rds_cluster_instance.test1.id} @@ -54,7 +56,9 @@ metadata: spec: forProvider: applyImmediately: true - clusterIdentifier: ${aws_rds_cluster.default.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default engine: ${aws_rds_cluster.default.engine} engineVersion: ${aws_rds_cluster.default.engine_version} instanceClass: db.t2.small @@ -73,7 +77,9 @@ metadata: spec: forProvider: applyImmediately: true - clusterIdentifier: ${aws_rds_cluster.default.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default engine: ${aws_rds_cluster.default.engine} engineVersion: ${aws_rds_cluster.default.engine_version} instanceClass: db.t2.small @@ -92,11 +98,10 @@ metadata: spec: forProvider: applyImmediately: true - clusterIdentifier: ${aws_rds_cluster.default.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default engine: ${aws_rds_cluster.default.engine} engineVersion: ${aws_rds_cluster.default.engine_version} instanceClass: db.t2.small region: us-west-1 - ---- - diff --git a/examples-generated/rds/clusterinstance.yaml b/examples-generated/rds/clusterinstance.yaml index a1e52e9..ee48014 100644 --- a/examples-generated/rds/clusterinstance.yaml +++ b/examples-generated/rds/clusterinstance.yaml @@ -8,7 +8,9 @@ metadata: name: cluster-instances spec: forProvider: - clusterIdentifier: ${aws_rds_cluster.default.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: default count: 2 engine: aurora-mysql engineVersion: ${aws_rds_cluster.default.engine_version} @@ -38,6 +40,3 @@ spec: namespace: upbound-system masterUsername: foo region: us-west-1 - ---- - diff --git a/examples-generated/rds/clusterparametergroup.yaml b/examples-generated/rds/clusterparametergroup.yaml index a2c13ba..ed19d68 100644 --- a/examples-generated/rds/clusterparametergroup.yaml +++ b/examples-generated/rds/clusterparametergroup.yaml @@ -16,6 +16,3 @@ spec: - name: character_set_client value: utf8 region: us-west-1 - ---- - diff --git a/examples-generated/rds/clusterroleassociation.yaml b/examples-generated/rds/clusterroleassociation.yaml index 0e41a7f..b9eec92 100644 --- a/examples-generated/rds/clusterroleassociation.yaml +++ b/examples-generated/rds/clusterroleassociation.yaml @@ -8,10 +8,11 @@ metadata: name: example spec: forProvider: - dbClusterIdentifier: ${aws_rds_cluster.example.id} + dbClusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example featureName: S3_INTEGRATION region: us-west-1 - roleArn: ${aws_iam_role.example.arn} - ---- - + roleArnSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples-generated/rds/clustersnapshot.yaml b/examples-generated/rds/clustersnapshot.yaml index 65cbe4b..93ef57b 100644 --- a/examples-generated/rds/clustersnapshot.yaml +++ b/examples-generated/rds/clustersnapshot.yaml @@ -8,9 +8,8 @@ metadata: name: example spec: forProvider: - dbClusterIdentifier: ${aws_rds_cluster.example.id} + dbClusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example dbClusterSnapshotIdentifier: resourcetestsnapshot1234 region: us-west-1 - ---- - diff --git a/examples-generated/rds/dbinstanceautomatedbackupsreplication.yaml b/examples-generated/rds/dbinstanceautomatedbackupsreplication.yaml index e663d05..ddc63b7 100644 --- a/examples-generated/rds/dbinstanceautomatedbackupsreplication.yaml +++ b/examples-generated/rds/dbinstanceautomatedbackupsreplication.yaml @@ -10,7 +10,6 @@ spec: forProvider: region: us-west-1 retentionPeriod: 14 - sourceDbInstanceArn: arn:aws:rds:us-west-2:123456789012:db:mydatabase - ---- - + sourceDbInstanceArnSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples-generated/rds/dbsnapshotcopy.yaml b/examples-generated/rds/dbsnapshotcopy.yaml index 6184c9d..6bde48d 100644 --- a/examples-generated/rds/dbsnapshotcopy.yaml +++ b/examples-generated/rds/dbsnapshotcopy.yaml @@ -9,7 +9,9 @@ metadata: spec: forProvider: region: us-west-1 - sourceDbSnapshotIdentifier: ${aws_db_snapshot.example.db_snapshot_arn} + sourceDbSnapshotIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example targetDbSnapshotIdentifier: testsnapshot1234-copy --- @@ -51,8 +53,7 @@ metadata: name: example spec: forProvider: - dbInstanceIdentifier: ${aws_db_instance.example.identifier} + dbInstanceIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 - ---- - diff --git a/examples-generated/rds/eventsubscription.yaml b/examples-generated/rds/eventsubscription.yaml index f4519a1..028f2ba 100644 --- a/examples-generated/rds/eventsubscription.yaml +++ b/examples-generated/rds/eventsubscription.yaml @@ -20,7 +20,9 @@ spec: - recovery - restoration region: us-west-1 - snsTopic: ${aws_sns_topic.default.arn} + snsTopicSelector: + matchLabels: + testing.upbound.io/example-name: default sourceIds: - ${aws_db_instance.default.identifier} sourceType: db-instance @@ -55,3 +57,14 @@ spec: --- +apiVersion: sns.aws.kubedb.com/v1alpha1 +kind: Topic +metadata: + annotations: + meta.upbound.io/example-id: rds/v1alpha1/eventsubscription + labels: + testing.upbound.io/example-name: default + name: default +spec: + forProvider: + region: us-west-1 diff --git a/examples-generated/rds/globalcluster.yaml b/examples-generated/rds/globalcluster.yaml index afe179b..8f27546 100644 --- a/examples-generated/rds/globalcluster.yaml +++ b/examples-generated/rds/globalcluster.yaml @@ -73,7 +73,9 @@ metadata: name: primary spec: forProvider: - clusterIdentifier: ${aws_rds_cluster.primary.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: primary dbSubnetGroupNameSelector: matchLabels: testing.upbound.io/example-name: example @@ -95,7 +97,9 @@ metadata: name: secondary spec: forProvider: - clusterIdentifier: ${aws_rds_cluster.secondary.id} + clusterIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: secondary dbSubnetGroupNameSelector: matchLabels: testing.upbound.io/example-name: example @@ -104,6 +108,3 @@ spec: instanceClass: db.r4.large provider: ${aws.secondary} region: us-west-1 - ---- - diff --git a/examples-generated/rds/instance.yaml b/examples-generated/rds/instance.yaml index 3c0c790..097bf33 100644 --- a/examples-generated/rds/instance.yaml +++ b/examples-generated/rds/instance.yaml @@ -21,6 +21,3 @@ spec: region: us-west-1 skipFinalSnapshot: true username: foo - ---- - diff --git a/examples-generated/rds/instanceroleassociation.yaml b/examples-generated/rds/instanceroleassociation.yaml index 3728fe3..49a47fd 100644 --- a/examples-generated/rds/instanceroleassociation.yaml +++ b/examples-generated/rds/instanceroleassociation.yaml @@ -8,10 +8,11 @@ metadata: name: example spec: forProvider: - dbInstanceIdentifier: ${aws_db_instance.example.identifier} + dbInstanceIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example featureName: S3_INTEGRATION region: us-west-1 - roleArn: ${aws_iam_role.example.arn} - ---- - + roleArnSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples-generated/rds/optiongroup.yaml b/examples-generated/rds/optiongroup.yaml index ffa8a15..a84f23e 100644 --- a/examples-generated/rds/optiongroup.yaml +++ b/examples-generated/rds/optiongroup.yaml @@ -22,6 +22,3 @@ spec: - optionName: TDE optionGroupDescription: Terraform Option Group region: us-west-1 - ---- - diff --git a/examples-generated/rds/parametergroup.yaml b/examples-generated/rds/parametergroup.yaml index b1cc577..fa5a8c2 100644 --- a/examples-generated/rds/parametergroup.yaml +++ b/examples-generated/rds/parametergroup.yaml @@ -15,6 +15,3 @@ spec: - name: character_set_client value: utf8 region: us-west-1 - ---- - diff --git a/examples-generated/rds/proxy.yaml b/examples-generated/rds/proxy.yaml index 0043e0d..e1801b3 100644 --- a/examples-generated/rds/proxy.yaml +++ b/examples-generated/rds/proxy.yaml @@ -12,20 +12,21 @@ spec: - authScheme: SECRETS description: example iamAuth: DISABLED - secretArn: ${aws_secretsmanager_secret.example.arn} + secretArnSelector: + matchLabels: + testing.upbound.io/example-name: example debugLogging: false engineFamily: MYSQL idleClientTimeout: 1800 region: us-west-1 requireTls: true - roleArn: ${aws_iam_role.example.arn} + roleArnSelector: + matchLabels: + testing.upbound.io/example-name: example tags: Key: value Name: example - vpcSecurityGroupIds: - - ${aws_security_group.example.id} + vpcSecurityGroupIdRefs: + - name: example vpcSubnetIds: - ${aws_subnet.example.id} - ---- - diff --git a/examples-generated/rds/proxydefaulttargetgroup.yaml b/examples-generated/rds/proxydefaulttargetgroup.yaml index 5d36ae7..813210a 100644 --- a/examples-generated/rds/proxydefaulttargetgroup.yaml +++ b/examples-generated/rds/proxydefaulttargetgroup.yaml @@ -15,7 +15,9 @@ spec: maxIdleConnectionsPercent: 50 sessionPinningFilters: - EXCLUDE_VARIABLE_SETS - dbProxyName: ${aws_db_proxy.example.name} + dbProxyNameSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 --- @@ -34,20 +36,21 @@ spec: - authScheme: SECRETS description: example iamAuth: DISABLED - secretArn: ${aws_secretsmanager_secret.example.arn} + secretArnSelector: + matchLabels: + testing.upbound.io/example-name: example debugLogging: false engineFamily: MYSQL idleClientTimeout: 1800 region: us-west-1 requireTls: true - roleArn: ${aws_iam_role.example.arn} + roleArnSelector: + matchLabels: + testing.upbound.io/example-name: example tags: Key: value Name: example - vpcSecurityGroupIds: - - ${aws_security_group.example.id} + vpcSecurityGroupIdRefs: + - name: example vpcSubnetIds: - ${aws_subnet.example.id} - ---- - diff --git a/examples-generated/rds/proxyendpoint.yaml b/examples-generated/rds/proxyendpoint.yaml index cf6e458..83ea12e 100644 --- a/examples-generated/rds/proxyendpoint.yaml +++ b/examples-generated/rds/proxyendpoint.yaml @@ -8,10 +8,9 @@ metadata: name: example spec: forProvider: - dbProxyName: ${aws_db_proxy.test.name} + dbProxyNameSelector: + matchLabels: + testing.upbound.io/example-name: test region: us-west-1 targetRole: READ_ONLY vpcSubnetIds: ${aws_subnet.test[*].id} - ---- - diff --git a/examples-generated/rds/proxytarget.yaml b/examples-generated/rds/proxytarget.yaml index 9fabd0c..d0c6f9f 100644 --- a/examples-generated/rds/proxytarget.yaml +++ b/examples-generated/rds/proxytarget.yaml @@ -8,8 +8,12 @@ metadata: name: example spec: forProvider: - dbInstanceIdentifier: ${aws_db_instance.example.identifier} - dbProxyName: ${aws_db_proxy.example.name} + dbInstanceIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: example + dbProxyNameSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 targetGroupName: ${aws_db_proxy_default_target_group.example.name} @@ -29,18 +33,22 @@ spec: - authScheme: SECRETS description: example iamAuth: DISABLED - secretArn: ${aws_secretsmanager_secret.example.arn} + secretArnSelector: + matchLabels: + testing.upbound.io/example-name: example debugLogging: false engineFamily: MYSQL idleClientTimeout: 1800 region: us-west-1 requireTls: true - roleArn: ${aws_iam_role.example.arn} + roleArnSelector: + matchLabels: + testing.upbound.io/example-name: example tags: Key: value Name: example - vpcSecurityGroupIds: - - ${aws_security_group.example.id} + vpcSecurityGroupIdRefs: + - name: example vpcSubnetIds: - ${aws_subnet.example.id} @@ -63,8 +71,7 @@ spec: maxIdleConnectionsPercent: 50 sessionPinningFilters: - EXCLUDE_VARIABLE_SETS - dbProxyName: example + dbProxyNameSelector: + matchLabels: + testing.upbound.io/example-name: example region: us-west-1 - ---- - diff --git a/examples-generated/rds/snapshot.yaml b/examples-generated/rds/snapshot.yaml index 728a91d..2fb6cc3 100644 --- a/examples-generated/rds/snapshot.yaml +++ b/examples-generated/rds/snapshot.yaml @@ -8,7 +8,9 @@ metadata: name: test spec: forProvider: - dbInstanceIdentifier: ${aws_db_instance.bar.identifier} + dbInstanceIdentifierSelector: + matchLabels: + testing.upbound.io/example-name: bar region: us-west-1 --- @@ -37,6 +39,3 @@ spec: namespace: upbound-system region: us-west-1 username: foo - ---- - diff --git a/examples-generated/rds/subnetgroup.yaml b/examples-generated/rds/subnetgroup.yaml index 1a55d97..9058cf1 100644 --- a/examples-generated/rds/subnetgroup.yaml +++ b/examples-generated/rds/subnetgroup.yaml @@ -9,11 +9,8 @@ metadata: spec: forProvider: region: us-west-1 - subnetIds: - - ${aws_subnet.frontend.id} - - ${aws_subnet.backend.id} + subnetIdRefs: + - name: frontend + - name: backend tags: Name: My DB subnet group - ---- - diff --git a/examples-generated/secretsmanager/secret.yaml b/examples-generated/secretsmanager/secret.yaml new file mode 100644 index 0000000..a3c3fa8 --- /dev/null +++ b/examples-generated/secretsmanager/secret.yaml @@ -0,0 +1,12 @@ +apiVersion: secretsmanager.aws.kubedb.com/v1alpha1 +kind: Secret +metadata: + annotations: + meta.upbound.io/example-id: secretsmanager/v1alpha1/secret + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + name: example + region: us-west-1 diff --git a/examples-generated/sns/topic.yaml b/examples-generated/sns/topic.yaml new file mode 100644 index 0000000..f988752 --- /dev/null +++ b/examples-generated/sns/topic.yaml @@ -0,0 +1,11 @@ +apiVersion: sns.aws.kubedb.com/v1alpha1 +kind: Topic +metadata: + annotations: + meta.upbound.io/example-id: sns/v1alpha1/topic + labels: + testing.upbound.io/example-name: user_updates + name: user-updates +spec: + forProvider: + region: us-west-1 diff --git a/examples/documentdb/documentdb-cluster-parametergroup.yaml b/examples/documentdb/documentdb-cluster-parametergroup.yaml new file mode 100644 index 0000000..342bf3f --- /dev/null +++ b/examples/documentdb/documentdb-cluster-parametergroup.yaml @@ -0,0 +1,17 @@ +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: ClusterParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/clusterparametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + description: docdb cluster parameter group + family: docdb5.0 + parameter: + - name: tls + value: enabled + region: us-east-2 +--- \ No newline at end of file diff --git a/examples/documentdb/documentdb-cluster-provision.yaml b/examples/documentdb/documentdb-cluster-provision.yaml new file mode 100644 index 0000000..1af7fb5 --- /dev/null +++ b/examples/documentdb/documentdb-cluster-provision.yaml @@ -0,0 +1,127 @@ +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: ClusterInstance +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/clusterinstance + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + clusterIdentifierRef: + name: example + instanceClass: db.t3.medium + region: us-east-2 +--- + +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: Cluster +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/cluster + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + engine: "docdb" + backupRetentionPeriod: 0 + masterPasswordSecretRef: + key: password + name: example-creds + namespace: crossplane-system + masterUsername: foo + preferredBackupWindow: 07:00-09:00 + skipFinalSnapshot: true + dbSubnetGroupName: example + +--- + +apiVersion: v1 +kind: Secret +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/cluster + labels: + testing.kubedb.com/example-name: docdb-creds + name: example-creds + namespace: crossplane-system +type: Opaque +stringData: + password: "Upboundtest!324225DD" + +--- + +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + description: My docdb subnet group + region: us-east-2 + subnetIdsRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My docdb subnet group +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- \ No newline at end of file diff --git a/examples/documentdb/documentdb-cluster-snapshot.yaml b/examples/documentdb/documentdb-cluster-snapshot.yaml new file mode 100644 index 0000000..8582619 --- /dev/null +++ b/examples/documentdb/documentdb-cluster-snapshot.yaml @@ -0,0 +1,14 @@ +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: ClusterSnapshot +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/clustersnapshot + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + dbClusterIdentifierRef: + name: example + region: us-east-2 +--- \ No newline at end of file diff --git a/examples/documentdb/documentdb-eventsubscription.yaml b/examples/documentdb/documentdb-eventsubscription.yaml new file mode 100644 index 0000000..f80f4f1 --- /dev/null +++ b/examples/documentdb/documentdb-eventsubscription.yaml @@ -0,0 +1,32 @@ +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: EventSubscription +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/eventsubscription + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + enabled: true + eventCategories: + - creation + - failure + region: us-east-2 + snsTopicArnRef: + name: example + sourceType: db-cluster +--- +apiVersion: sns.aws.kubedb.com/v1alpha1 +kind: Topic +metadata: + annotations: + meta.kubedb.com/example-id: docdb/v1alpha1/eventsubscription + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + +--- diff --git a/examples/documentdb/documentdb-global-cluster.yaml b/examples/documentdb/documentdb-global-cluster.yaml new file mode 100644 index 0000000..475ef50 --- /dev/null +++ b/examples/documentdb/documentdb-global-cluster.yaml @@ -0,0 +1,13 @@ +apiVersion: docdb.aws.kubedb.com/v1alpha1 +kind: GlobalCluster +metadata: + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + engine: docdb + engineVersion: 5.0.0 + globalClusterIdentifier: global-test +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-contibutorinsight.yaml b/examples/dynamodb/dynamodb-contibutorinsight.yaml new file mode 100644 index 0000000..54cc47d --- /dev/null +++ b/examples/dynamodb/dynamodb-contibutorinsight.yaml @@ -0,0 +1,15 @@ + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: ContributorInsights +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/contributorinsights + labels: + testing.kubedb.com/example-name: contributor + name: example +spec: + forProvider: + region: us-east-2 + tableNameRef: + name: mytable +--- diff --git a/examples/dynamodb/dynamodb-globaltable.yaml b/examples/dynamodb/dynamodb-globaltable.yaml new file mode 100644 index 0000000..7887b67 --- /dev/null +++ b/examples/dynamodb/dynamodb-globaltable.yaml @@ -0,0 +1,17 @@ + +# We can deploy globaltable or tablereplica at a time. Both won't work together. +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: GlobalTable +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/globaltable + labels: + testing.kubedb.com/example-name: mytable + name: mytable +spec: + forProvider: + region: us-east-1 + replica: + - regionName: us-east-2 + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-kinesisstream.yaml b/examples/dynamodb/dynamodb-kinesisstream.yaml new file mode 100644 index 0000000..634fb7c --- /dev/null +++ b/examples/dynamodb/dynamodb-kinesisstream.yaml @@ -0,0 +1,32 @@ +apiVersion: kinesis.aws.kubedb.com/v1alpha1 +kind: Stream +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/kinesisstreamingdestination + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + shardCount: 1 + +--- + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: KinesisStreamingDestination +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/kinesisstreamingdestination + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + streamArnRef: + name: example + tableNameRef: + name: mytable + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-table-feature.yaml b/examples/dynamodb/dynamodb-table-feature.yaml new file mode 100644 index 0000000..a69b690 --- /dev/null +++ b/examples/dynamodb/dynamodb-table-feature.yaml @@ -0,0 +1,140 @@ +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: Table +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/table + labels: + testing.kubedb.com/example-name: mytable + name: mytable +spec: + forProvider: + attribute: + - name: exampleHashKey + type: S + hashKey: exampleHashKey + region: us-east-2 + streamEnabled: true + streamViewType: NEW_AND_OLD_IMAGES + billingMode: PAY_PER_REQUEST +--- +# We can deploy globaltable or tablereplica at a time. Both won't work together. +# apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +# kind: GlobalTable +# metadata: +# annotations: +# meta.kubedb.com/example-id: dynamodb/v1alpha1/globaltable +# labels: +# testing.kubedb.com/example-name: mytable +# name: mytable +# spec: +# forProvider: +# region: us-east-1 +# replica: +# - regionName: us-east-2 + +# --- +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: TableReplica +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tablereplica + labels: + testing.kubedb.com/example-name: mytablerep + name: mytablerep +spec: + forProvider: + globalTableArnRef: + name: mytable + region: us-west-2 + +--- +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: TableItem +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tableitem + labels: + testing.kubedb.com/example-name: mytable + name: example +spec: + forProvider: + hashKey: exampleHashKey + item: | + { + "exampleHashKey": {"S": "something"}, + "one": {"N": "11111"}, + "two": {"N": "22222"}, + "three": {"N": "33333"}, + "four": {"N": "44444"} + } + region: us-east-2 + tableNameRef: + name: mytable + +--- + +apiVersion: kinesis.aws.kubedb.com/v1alpha1 +kind: Stream +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/kinesisstreamingdestination + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + shardCount: 1 + +--- + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: KinesisStreamingDestination +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/kinesisstreamingdestination + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + streamArnRef: + name: example + tableNameRef: + name: mytable + +--- + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: ContributorInsights +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/contributorinsights + labels: + testing.kubedb.com/example-name: contributor + name: example +spec: + forProvider: + region: us-east-2 + tableNameRef: + name: mytable + +--- + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: Tag +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tag + labels: + testing.kubedb.com/example-name: test + name: example +spec: + forProvider: + key: testkey + region: us-east-2 + resourceArn: arn:aws:dynamodb:us-east-2:452618475015:table/mytable + value: testvalue + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-table.yaml b/examples/dynamodb/dynamodb-table.yaml new file mode 100644 index 0000000..96e015d --- /dev/null +++ b/examples/dynamodb/dynamodb-table.yaml @@ -0,0 +1,20 @@ +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: Table +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/table + labels: + testing.kubedb.com/example-name: mytable + name: mytable +spec: + forProvider: + attribute: + - name: exampleHashKey + type: S + hashKey: exampleHashKey + region: us-east-2 + streamEnabled: true + streamViewType: NEW_AND_OLD_IMAGES + billingMode: PAY_PER_REQUEST + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-tableitem.yaml b/examples/dynamodb/dynamodb-tableitem.yaml new file mode 100644 index 0000000..05b9d8c --- /dev/null +++ b/examples/dynamodb/dynamodb-tableitem.yaml @@ -0,0 +1,24 @@ +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: TableItem +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tableitem + labels: + testing.kubedb.com/example-name: mytable + name: example +spec: + forProvider: + hashKey: exampleHashKey + item: | + { + "exampleHashKey": {"S": "something"}, + "one": {"N": "11111"}, + "two": {"N": "22222"}, + "three": {"N": "33333"}, + "four": {"N": "44444"} + } + region: us-east-2 + tableNameRef: + name: mytable + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-tablereplica.yaml b/examples/dynamodb/dynamodb-tablereplica.yaml new file mode 100644 index 0000000..359fbe2 --- /dev/null +++ b/examples/dynamodb/dynamodb-tablereplica.yaml @@ -0,0 +1,18 @@ + +# We can deploy globaltable or tablereplica at a time. Both won't work together. + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: TableReplica +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tablereplica + labels: + testing.kubedb.com/example-name: mytablerep + name: mytablerep +spec: + forProvider: + globalTableArnRef: + name: mytable + region: us-west-2 + +--- \ No newline at end of file diff --git a/examples/dynamodb/dynamodb-tag.yaml b/examples/dynamodb/dynamodb-tag.yaml new file mode 100644 index 0000000..0eba48a --- /dev/null +++ b/examples/dynamodb/dynamodb-tag.yaml @@ -0,0 +1,17 @@ + +apiVersion: dynamodb.aws.kubedb.com/v1alpha1 +kind: Tag +metadata: + annotations: + meta.kubedb.com/example-id: dynamodb/v1alpha1/tag + labels: + testing.kubedb.com/example-name: test + name: example +spec: + forProvider: + key: testkey + region: us-east-2 + resourceArn: arn:aws:dynamodb:us-east-2:452618475015:table/mytable + value: testvalue + +--- \ No newline at end of file diff --git a/examples/elasticache/redis-cluster-provision.yaml b/examples/elasticache/redis-cluster-provision.yaml new file mode 100644 index 0000000..899c568 --- /dev/null +++ b/examples/elasticache/redis-cluster-provision.yaml @@ -0,0 +1,111 @@ +apiVersion: elasticache.aws.kubedb.com/v1alpha1 +kind: Cluster +metadata: + annotations: + meta.kubedb.com/example-id: elasticache/v1alpha1/cluster + uptest.kubedb.com/timeout: "3600" + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + engine: redis + nodeType: cache.t2.micro + numCacheNodes: 1 + parameterGroupName: default.redis7 + #parameterGroupName: cache-params-test + port: 6379 + securityGroupIdRefs: + - name: example + subnetGroupNameRef: + name: example + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: SecurityGroup +metadata: + annotations: + meta.kubedb.com/example-id: elasticache/v1alpha1/cluster + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + vpcIdRef: + name: example +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: elasticache.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + annotations: + meta.upbound.io/example-id: elasticache/v1aplha1/cluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 +--- \ No newline at end of file diff --git a/examples/elasticache/redis-parametergroup.yaml b/examples/elasticache/redis-parametergroup.yaml new file mode 100644 index 0000000..27c352d --- /dev/null +++ b/examples/elasticache/redis-parametergroup.yaml @@ -0,0 +1,17 @@ +apiVersion: elasticache.aws.kubedb.com/v1alpha1 +kind: ParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: elasticache/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: default + name: example +spec: + forProvider: + name: cache-params-test + family: redis7 + parameter: + - name: activedefrag + value: "yes" + region: us-east-2 +--- \ No newline at end of file diff --git a/examples/elasticache/redis-replicationgroup.yaml b/examples/elasticache/redis-replicationgroup.yaml new file mode 100644 index 0000000..93de4ea --- /dev/null +++ b/examples/elasticache/redis-replicationgroup.yaml @@ -0,0 +1,19 @@ +apiVersion: elasticache.aws.kubedb.com/v1alpha1 +kind: ReplicationGroup +metadata: + annotations: + uptest.kubedb.com/timeout: "3600" + name: example-rep +spec: + forProvider: + automaticFailoverEnabled: true + description: example description + nodeType: cache.t2.micro + numCacheClusters: 2 + parameterGroupName: default.redis7 + port: 6379 + preferredCacheClusterAzs: + - us-east-2b + - us-east-2c + region: us-east-2 +--- \ No newline at end of file diff --git a/examples/elasticache/redis-user.yaml b/examples/elasticache/redis-user.yaml new file mode 100644 index 0000000..a6099be --- /dev/null +++ b/examples/elasticache/redis-user.yaml @@ -0,0 +1,62 @@ + +## faced this error for the YAML, given below +# apply failed: creating ElastiCache User (sample-user): InvalidParameterCombination: A user with Authentication Mode: password, must have at least one password +# status code: 400, request id: 7ffb8623-dac7-4af3-8430-70719f848483: +--- +apiVersion: elasticache.aws.kubedb.com/v1alpha1 +kind: User +metadata: + annotations: + upjet.kubedb.com/manual-intervention: "This resource needs secrets that must contain valid credentials." + name: example-user +spec: + forProvider: + userName: "testUserName" + accessString: "on ~* +@all" + engine: "REDIS" + region: us-east-2 + passwordsSecretRef: + - name: user-passwords + namespace: crossplane-system + key: pwd-1 + authenticationMode: + - type: password + writeConnectionSecretToRef: + name: user-conn + namespace: default + + +--- +apiVersion: v1 +kind: Secret +metadata: + name: example-password + namespace: crossplane-system +type: Opaque +stringData: + pwd-1: "Upboundtest!123435689" + + +--- +# faced this error for the YAML, given below +# observe failed: cannot get connection details: cannot get connection details: cannot +# expand wildcards: cannot expand wildcards for segments: "passwords[*]": "passwords": unexpected wildcard usage + +# apiVersion: elasticache.aws.kubedb.com/v1alpha1 +# kind: User +# metadata: +# annotations: +# upjet.kubedb.com/manual-intervention: "This resource needs secrets that must contain valid credentials." +# name: sample-user +# spec: +# forProvider: +# userName: "testUserName" +# accessString: "on ~* +@all" +# engine: "REDIS" +# region: us-east-2 +# authenticationMode: +# - type: no-password-required +# writeConnectionSecretToRef: +# name: user-conn +# namespace: default +--- \ No newline at end of file diff --git a/examples/iam/role.yaml b/examples/iam/role.yaml new file mode 100644 index 0000000..9bbc8f8 --- /dev/null +++ b/examples/iam/role.yaml @@ -0,0 +1,50 @@ +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: iam/v1alpha1/role + labels: + testing.upbound.io/example-name: role + name: role +spec: + forProvider: + assumeRolePolicy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + } + inlinePolicy: + - name: my_inline_policy + policy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "secretsmanager:GetRandomPassword", + "secretsmanager:CreateSecret", + "secretsmanager:ListSecrets" + ], + "Resource": "*" + }, + { + "Sid": "VisualEditor1", + "Effect": "Allow", + "Action": "secretsmanager:*", + "Resource": [ + "your_secret_ARN" + ] + } + ] + } +--- \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-dbsnapshotcopy.yaml b/examples/rds/mariadb/mariadb-dbsnapshotcopy.yaml new file mode 100644 index 0000000..1fd80f0 --- /dev/null +++ b/examples/rds/mariadb/mariadb-dbsnapshotcopy.yaml @@ -0,0 +1,29 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: DBSnapshotCopy +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/dbsnapshotcopy + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + sourceDbSnapshotIdentifierRef: + name: example + targetDbSnapshotIdentifier: testsnapshot1234-copy +--- +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-instance-provision.yaml b/examples/rds/mariadb/mariadb-instance-provision.yaml new file mode 100644 index 0000000..1dcec16 --- /dev/null +++ b/examples/rds/mariadb/mariadb-instance-provision.yaml @@ -0,0 +1,156 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Instance +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: example-dbinstance + name: example +spec: + forProvider: + region: us-east-2 + engine: mariadb + engineVersion: "10.6.14" + username: adminuser + dbName: dbexample + #autoGeneratePassword: true + passwordSecretRef: + key: password + name: example-dbinstance + namespace: crossplane-system + instanceClass: db.t3.micro + storageType: gp2 + allocatedStorage: 20 + dbSubnetGroupName: example + kmsKeyIdRef: + name: sample-key + backupRetentionPeriod: 0 + backupWindow: "09:46-10:16" + maintenanceWindow: "Mon:00:00-Mon:03:00" + publiclyAccessible: false + skipFinalSnapshot: true + storageEncrypted: true + autoMinorVersionUpgrade: true + parameterGroupName: example + writeConnectionSecretToRef: + name: example-dbinstance-out + namespace: default +--- + +apiVersion: kms.aws.kubedb.com/v1alpha1 +kind: Key +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: sample-key + name: sample-key +spec: + forProvider: + region: us-east-2 + description: Created with Crossplane + deletionWindowInDays: 7 + +--- +apiVersion: v1 +kind: Secret +metadata: + name: example-dbinstance + namespace: crossplane-system +type: Opaque +data: + password: MTIzNDU2Nzg= + #12345678 + + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My DB subnet group + +--- +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: mariadb10.6 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate + +--- \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-optiongroup.yaml b/examples/rds/mariadb/mariadb-optiongroup.yaml new file mode 100644 index 0000000..5d6d6a7 --- /dev/null +++ b/examples/rds/mariadb/mariadb-optiongroup.yaml @@ -0,0 +1,12 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: OptionGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + engineName: mariadb + majorEngineVersion: "10.6" + option: + - optionName: TDE + optionGroupDescription: Kubedb Option Group \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-parametergroup.yaml b/examples/rds/mariadb/mariadb-parametergroup.yaml new file mode 100644 index 0000000..b8a4bfa --- /dev/null +++ b/examples/rds/mariadb/mariadb-parametergroup.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: mariadb10.6 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate + +--- \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-proxy-target.yaml b/examples/rds/mariadb/mariadb-proxy-target.yaml new file mode 100644 index 0000000..20c278a --- /dev/null +++ b/examples/rds/mariadb/mariadb-proxy-target.yaml @@ -0,0 +1,16 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyTarget +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + dbInstanceIdentifier: example + targetGroupName: default + providerConfigRef: + name: default + +--- diff --git a/examples/rds/mariadb/mariadb-proxy.yaml b/examples/rds/mariadb/mariadb-proxy.yaml new file mode 100644 index 0000000..bac689b --- /dev/null +++ b/examples/rds/mariadb/mariadb-proxy.yaml @@ -0,0 +1,87 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Proxy +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a secret reference." +spec: + forProvider: + region: us-east-2 + auth: + - authScheme: SECRETS + description: example + iamAuth: DISABLED + secretArnRef: + name: example2 + debugLogging: false + engineFamily: MYSQL + idleClientTimeout: 1800 + requireTls: true + roleArnRef: + name: role + tags: + Key: value + Name: example + vpcSubnetIds: + - subnet-0959b298efb278524 + - subnet-0fba75208c6407ff3 + - subnet-04ae2f304f84994d6 +--- + +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: iam/v1alpha1/role + labels: + testing.upbound.io/example-name: role + name: role +spec: + forProvider: + assumeRolePolicy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + } + inlinePolicy: + - name: my_inline_policy + policy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "secretsmanager:GetRandomPassword", + "secretsmanager:CreateSecret", + "secretsmanager:ListSecrets" + ], + "Resource": "*" + } + ] + } +--- + +apiVersion: secretsmanager.aws.kubedb.com/v1alpha1 +kind: Secret +metadata: + annotations: + meta.upbound.io/example-id: secretsmanager/v1alpha1/secretrotation + labels: + testing.upbound.io/example-name: example2 + name: example2 +spec: + forProvider: + name: example2 + region: us-east-2 +--- + \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-proxydefaulttargetgroup.yaml b/examples/rds/mariadb/mariadb-proxydefaulttargetgroup.yaml new file mode 100644 index 0000000..d08d6c8 --- /dev/null +++ b/examples/rds/mariadb/mariadb-proxydefaulttargetgroup.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyDefaultTargetGroup +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + dbProxyName: example + region: us-east-2 + connectionPoolConfig: + - connectionBorrowTimeout: 60 + initQuery: SET x=1, y=2 + maxConnectionsPercent: 100 + maxIdleConnectionsPercent: 50 + sessionPinningFilters: + - EXCLUDE_VARIABLE_SETS + +--- diff --git a/examples/rds/mariadb/mariadb-proxyendpoint.yaml b/examples/rds/mariadb/mariadb-proxyendpoint.yaml new file mode 100644 index 0000000..8ed0408 --- /dev/null +++ b/examples/rds/mariadb/mariadb-proxyendpoint.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyEndpoint +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + targetRole: READ_ONLY + vpcSubnetIds: + - subnet-085e9e289fcdffa8d + - subnet-0e16c787993d3b584 + - subnet-0cf69ebb0982d9ac6 + providerConfigRef: + name: default + +--- \ No newline at end of file diff --git a/examples/rds/mariadb/mariadb-snapshot.yaml b/examples/rds/mariadb/mariadb-snapshot.yaml new file mode 100644 index 0000000..0afb767 --- /dev/null +++ b/examples/rds/mariadb/mariadb-snapshot.yaml @@ -0,0 +1,14 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- + diff --git a/examples/rds/mysql/mysql-cluster-parametergroup.yaml b/examples/rds/mysql/mysql-cluster-parametergroup.yaml new file mode 100644 index 0000000..ecfc2b0 --- /dev/null +++ b/examples/rds/mysql/mysql-cluster-parametergroup.yaml @@ -0,0 +1,18 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ClusterParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: mysql8.0 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate +--- \ No newline at end of file diff --git a/examples/rds/mysql/mysql-cluster-provision.yaml b/examples/rds/mysql/mysql-cluster-provision.yaml new file mode 100644 index 0000000..86a04d4 --- /dev/null +++ b/examples/rds/mysql/mysql-cluster-provision.yaml @@ -0,0 +1,107 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Cluster +metadata: + name: example + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/cluster +spec: + forProvider: + dbSubnetGroupName: example + region: us-east-2 + engine: mysql + engineVersion: "8.0.33" + masterUsername: "cpadmin" + masterPasswordSecretRef: + name: example-password + namespace: crossplane-system + key: password + skipFinalSnapshot: true + dbClusterInstanceClass: db.m5d.large + storageType: io1 + allocatedStorage: 100 + iops: 1000 + writeConnectionSecretToRef: + name: sample-rds-cluster-secret + namespace: crossplane-system + +--- + +apiVersion: v1 +kind: Secret +metadata: + name: example-password + namespace: crossplane-system +type: Opaque +stringData: + password: TestPass0! + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My DB subnet group \ No newline at end of file diff --git a/examples/rds/mysql/mysql-cluster-snapshot.yaml b/examples/rds/mysql/mysql-cluster-snapshot.yaml new file mode 100644 index 0000000..4e9af48 --- /dev/null +++ b/examples/rds/mysql/mysql-cluster-snapshot.yaml @@ -0,0 +1,16 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ClusterSnapshot +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/clustersnapshot + upjet.kubedb.com/manual-intervention: "This resource has a reference to Cluster, which needs manual intervention." + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + dbClusterIdentifier: example + dbClusterSnapshotIdentifier: resourcetestsnapshot1234 + region: us-east-2 + +--- \ No newline at end of file diff --git a/examples/rds/mysql/mysql-dbsnapshotcopy.yaml b/examples/rds/mysql/mysql-dbsnapshotcopy.yaml new file mode 100644 index 0000000..1fd80f0 --- /dev/null +++ b/examples/rds/mysql/mysql-dbsnapshotcopy.yaml @@ -0,0 +1,29 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: DBSnapshotCopy +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/dbsnapshotcopy + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + sourceDbSnapshotIdentifierRef: + name: example + targetDbSnapshotIdentifier: testsnapshot1234-copy +--- +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- \ No newline at end of file diff --git a/examples/rds/mysql/mysql-instance-provision.yaml b/examples/rds/mysql/mysql-instance-provision.yaml new file mode 100644 index 0000000..baff920 --- /dev/null +++ b/examples/rds/mysql/mysql-instance-provision.yaml @@ -0,0 +1,134 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Instance +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: example-dbinstance + name: example +spec: + forProvider: + region: us-east-2 + engine: mysql + engineVersion: "8.0.33" + username: adminuser + dbName: dbexample + #autoGeneratePassword: true + passwordSecretRef: + key: password + name: example-dbinstance + namespace: crossplane-system + instanceClass: db.t3.micro + storageType: gp2 + allocatedStorage: 20 + dbSubnetGroupName: example + kmsKeyIdRef: + name: sample-key + backupRetentionPeriod: 0 + backupWindow: "09:46-10:16" + maintenanceWindow: "Mon:00:00-Mon:03:00" + publiclyAccessible: false + skipFinalSnapshot: true + storageEncrypted: true + autoMinorVersionUpgrade: true + writeConnectionSecretToRef: + name: example-dbinstance-out + namespace: default +--- + +apiVersion: kms.aws.kubedb.com/v1alpha1 +kind: Key +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: sample-key + name: sample-key +spec: + forProvider: + region: us-east-2 + description: Created with Crossplane + deletionWindowInDays: 7 + +--- +apiVersion: v1 +kind: Secret +metadata: + name: example-dbinstance + namespace: crossplane-system +type: Opaque +data: + password: MTIzNDU2Nzg= + #12345678 + + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My DB subnet group \ No newline at end of file diff --git a/examples/rds/mysql/mysql-optiongroup.yaml b/examples/rds/mysql/mysql-optiongroup.yaml new file mode 100644 index 0000000..221afc7 --- /dev/null +++ b/examples/rds/mysql/mysql-optiongroup.yaml @@ -0,0 +1,12 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: OptionGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + engineName: mysql + majorEngineVersion: "8.0" + option: + - optionName: TDE + optionGroupDescription: Kubedb Option Group \ No newline at end of file diff --git a/examples/rds/mysql/mysql-parametergroup.yaml b/examples/rds/mysql/mysql-parametergroup.yaml new file mode 100644 index 0000000..f55151b --- /dev/null +++ b/examples/rds/mysql/mysql-parametergroup.yaml @@ -0,0 +1,17 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: mysql8.0 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate \ No newline at end of file diff --git a/examples/rds/mysql/mysql-proxy-target.yaml b/examples/rds/mysql/mysql-proxy-target.yaml new file mode 100644 index 0000000..20c278a --- /dev/null +++ b/examples/rds/mysql/mysql-proxy-target.yaml @@ -0,0 +1,16 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyTarget +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + dbInstanceIdentifier: example + targetGroupName: default + providerConfigRef: + name: default + +--- diff --git a/examples/rds/mysql/mysql-proxy.yaml b/examples/rds/mysql/mysql-proxy.yaml new file mode 100644 index 0000000..44a23e6 --- /dev/null +++ b/examples/rds/mysql/mysql-proxy.yaml @@ -0,0 +1,87 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Proxy +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a secret reference." +spec: + forProvider: + region: us-east-2 + auth: + - authScheme: SECRETS + description: example + iamAuth: DISABLED + secretArnRef: + name: example2 + debugLogging: false + engineFamily: MYSQL + idleClientTimeout: 1800 + requireTls: true + roleArnRef: + name: role + tags: + Key: value + Name: example + vpcSubnetIds: + - subnet-0546de20b40a2c0c1 + - subnet-030de9d358df790ad + - subnet-09c2fc96a4cd866a7 +--- + +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: iam/v1alpha1/role + labels: + testing.upbound.io/example-name: role + name: role +spec: + forProvider: + assumeRolePolicy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + } + inlinePolicy: + - name: my_inline_policy + policy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "secretsmanager:GetRandomPassword", + "secretsmanager:CreateSecret", + "secretsmanager:ListSecrets" + ], + "Resource": "*" + } + ] + } +--- + +apiVersion: secretsmanager.aws.kubedb.com/v1alpha1 +kind: Secret +metadata: + annotations: + meta.upbound.io/example-id: secretsmanager/v1alpha1/secretrotation + labels: + testing.upbound.io/example-name: example2 + name: example2 +spec: + forProvider: + name: example2 + region: us-east-2 +--- + \ No newline at end of file diff --git a/examples/rds/mysql/mysql-proxydefaulttargetgroup.yaml b/examples/rds/mysql/mysql-proxydefaulttargetgroup.yaml new file mode 100644 index 0000000..d08d6c8 --- /dev/null +++ b/examples/rds/mysql/mysql-proxydefaulttargetgroup.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyDefaultTargetGroup +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + dbProxyName: example + region: us-east-2 + connectionPoolConfig: + - connectionBorrowTimeout: 60 + initQuery: SET x=1, y=2 + maxConnectionsPercent: 100 + maxIdleConnectionsPercent: 50 + sessionPinningFilters: + - EXCLUDE_VARIABLE_SETS + +--- diff --git a/examples/rds/mysql/mysql-proxyendpoint.yaml b/examples/rds/mysql/mysql-proxyendpoint.yaml new file mode 100644 index 0000000..8ed0408 --- /dev/null +++ b/examples/rds/mysql/mysql-proxyendpoint.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyEndpoint +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + targetRole: READ_ONLY + vpcSubnetIds: + - subnet-085e9e289fcdffa8d + - subnet-0e16c787993d3b584 + - subnet-0cf69ebb0982d9ac6 + providerConfigRef: + name: default + +--- \ No newline at end of file diff --git a/examples/rds/mysql/mysql-snapshot.yaml b/examples/rds/mysql/mysql-snapshot.yaml new file mode 100644 index 0000000..0afb767 --- /dev/null +++ b/examples/rds/mysql/mysql-snapshot.yaml @@ -0,0 +1,14 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- + diff --git a/examples/rds/postgres/postgres-cluster-parametergroup.yaml b/examples/rds/postgres/postgres-cluster-parametergroup.yaml new file mode 100644 index 0000000..272b410 --- /dev/null +++ b/examples/rds/postgres/postgres-cluster-parametergroup.yaml @@ -0,0 +1,18 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ClusterParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: postgres13 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate +--- \ No newline at end of file diff --git a/examples/rds/postgres/postgres-cluster-provision.yaml b/examples/rds/postgres/postgres-cluster-provision.yaml new file mode 100644 index 0000000..28272ac --- /dev/null +++ b/examples/rds/postgres/postgres-cluster-provision.yaml @@ -0,0 +1,107 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Cluster +metadata: + name: example + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/cluster +spec: + forProvider: + dbSubnetGroupName: example + region: us-east-2 + engine: postgres + engineVersion: "15.3" + masterUsername: "cpadmin" + masterPasswordSecretRef: + name: example-password + namespace: crossplane-system + key: password + skipFinalSnapshot: true + dbClusterInstanceClass: db.m5d.large + storageType: io1 + allocatedStorage: 100 + iops: 1000 + writeConnectionSecretToRef: + name: sample-rds-cluster-secret + namespace: crossplane-system + +--- + +apiVersion: v1 +kind: Secret +metadata: + name: example-password + namespace: crossplane-system +type: Opaque +stringData: + password: TestPass0! + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My DB subnet group \ No newline at end of file diff --git a/examples/rds/postgres/postgres-cluster-snapshot.yaml b/examples/rds/postgres/postgres-cluster-snapshot.yaml new file mode 100644 index 0000000..4e9af48 --- /dev/null +++ b/examples/rds/postgres/postgres-cluster-snapshot.yaml @@ -0,0 +1,16 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ClusterSnapshot +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/clustersnapshot + upjet.kubedb.com/manual-intervention: "This resource has a reference to Cluster, which needs manual intervention." + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + dbClusterIdentifier: example + dbClusterSnapshotIdentifier: resourcetestsnapshot1234 + region: us-east-2 + +--- \ No newline at end of file diff --git a/examples/rds/postgres/postgres-dbsnapshotcopy.yaml b/examples/rds/postgres/postgres-dbsnapshotcopy.yaml new file mode 100644 index 0000000..1fd80f0 --- /dev/null +++ b/examples/rds/postgres/postgres-dbsnapshotcopy.yaml @@ -0,0 +1,29 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: DBSnapshotCopy +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/dbsnapshotcopy + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + sourceDbSnapshotIdentifierRef: + name: example + targetDbSnapshotIdentifier: testsnapshot1234-copy +--- +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- \ No newline at end of file diff --git a/examples/rds/postgres/postgres-instance-provision.yaml b/examples/rds/postgres/postgres-instance-provision.yaml new file mode 100644 index 0000000..5981b2a --- /dev/null +++ b/examples/rds/postgres/postgres-instance-provision.yaml @@ -0,0 +1,134 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Instance +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: example-dbinstance + name: example +spec: + forProvider: + region: us-east-2 + engine: postgres + engineVersion: "15.4" + username: adminuser + dbName: dbexample + #autoGeneratePassword: true + passwordSecretRef: + key: password + name: example-dbinstance + namespace: crossplane-system + instanceClass: db.t3.micro + storageType: gp2 + allocatedStorage: 20 + dbSubnetGroupName: example + kmsKeyIdRef: + name: sample-key + backupRetentionPeriod: 0 + backupWindow: "09:46-10:16" + maintenanceWindow: "Mon:00:00-Mon:03:00" + publiclyAccessible: false + skipFinalSnapshot: true + storageEncrypted: true + autoMinorVersionUpgrade: true + writeConnectionSecretToRef: + name: example-dbinstance-out + namespace: default +--- + +apiVersion: kms.aws.kubedb.com/v1alpha1 +kind: Key +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/instance + labels: + testing.kubedb.com/example-name: sample-key + name: sample-key +spec: + forProvider: + region: us-east-2 + description: Created with Crossplane + deletionWindowInDays: 7 + +--- +apiVersion: v1 +kind: Secret +metadata: + name: example-dbinstance + namespace: crossplane-system +type: Opaque +data: + password: MTIzNDU2Nzg= + #12345678 + + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: VPC +metadata: + name: example +spec: + forProvider: + region: us-east-2 + cidrBlock: 172.16.0.0/16 + tags: + Name: DemoVpc + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet1 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2b + vpcIdRef: + name: example + cidrBlock: 172.16.10.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet2 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2c + vpcIdRef: + name: example + cidrBlock: 172.16.20.0/24 + +--- + +apiVersion: ec2.aws.kubedb.com/v1alpha1 +kind: Subnet +metadata: + name: example-subnet3 +spec: + forProvider: + region: us-east-2 + availabilityZone: us-east-2a + vpcIdRef: + name: example + cidrBlock: 172.16.30.0/24 + +--- + +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: SubnetGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + subnetIdRefs: + - name: example-subnet1 + - name: example-subnet2 + - name: example-subnet3 + tags: + Name: My DB subnet group \ No newline at end of file diff --git a/examples/rds/postgres/postgres-optiongroup.yaml b/examples/rds/postgres/postgres-optiongroup.yaml new file mode 100644 index 0000000..9bb8c00 --- /dev/null +++ b/examples/rds/postgres/postgres-optiongroup.yaml @@ -0,0 +1,12 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: OptionGroup +metadata: + name: example +spec: + forProvider: + region: us-east-2 + engineName: sqlserver-ee + majorEngineVersion: "11.00" + option: + - optionName: TDE + optionGroupDescription: Kubedb Option Group \ No newline at end of file diff --git a/examples/rds/postgres/postgres-parametergroup.yaml b/examples/rds/postgres/postgres-parametergroup.yaml new file mode 100644 index 0000000..abe868b --- /dev/null +++ b/examples/rds/postgres/postgres-parametergroup.yaml @@ -0,0 +1,17 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ParameterGroup +metadata: + annotations: + meta.kubedb.com/example-id: rds/v1alpha1/parametergroup + labels: + testing.kubedb.com/example-name: example + name: example +spec: + forProvider: + region: us-east-2 + family: postgres12 + description: example + parameter: + - name: application_name + value: "example" + applyMethod: immediate \ No newline at end of file diff --git a/examples/rds/postgres/postgres-proxy-target.yaml b/examples/rds/postgres/postgres-proxy-target.yaml new file mode 100644 index 0000000..20c278a --- /dev/null +++ b/examples/rds/postgres/postgres-proxy-target.yaml @@ -0,0 +1,16 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyTarget +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + dbInstanceIdentifier: example + targetGroupName: default + providerConfigRef: + name: default + +--- diff --git a/examples/rds/postgres/postgres-proxy.yaml b/examples/rds/postgres/postgres-proxy.yaml new file mode 100644 index 0000000..0987763 --- /dev/null +++ b/examples/rds/postgres/postgres-proxy.yaml @@ -0,0 +1,87 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Proxy +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a secret reference." +spec: + forProvider: + region: us-east-2 + auth: + - authScheme: SECRETS + description: example + iamAuth: DISABLED + secretArnRef: + name: example2 + debugLogging: false + engineFamily: POSTGRESQL + idleClientTimeout: 1800 + requireTls: true + roleArnRef: + name: role + tags: + Key: value + Name: example + vpcSubnetIds: + - subnet-0546de20b40a2c0c1 + - subnet-030de9d358df790ad + - subnet-09c2fc96a4cd866a7 +--- + +apiVersion: iam.aws.kubedb.com/v1alpha1 +kind: Role +metadata: + annotations: + meta.upbound.io/example-id: iam/v1alpha1/role + labels: + testing.upbound.io/example-name: role + name: role +spec: + forProvider: + assumeRolePolicy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + } + inlinePolicy: + - name: my_inline_policy + policy: | + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "secretsmanager:GetRandomPassword", + "secretsmanager:CreateSecret", + "secretsmanager:ListSecrets" + ], + "Resource": "*" + } + ] + } +--- + +apiVersion: secretsmanager.aws.kubedb.com/v1alpha1 +kind: Secret +metadata: + annotations: + meta.upbound.io/example-id: secretsmanager/v1alpha1/secretrotation + labels: + testing.upbound.io/example-name: example2 + name: example2 +spec: + forProvider: + name: example2 + region: us-east-2 +--- + \ No newline at end of file diff --git a/examples/rds/postgres/postgres-proxydefaulttargetgroup.yaml b/examples/rds/postgres/postgres-proxydefaulttargetgroup.yaml new file mode 100644 index 0000000..d08d6c8 --- /dev/null +++ b/examples/rds/postgres/postgres-proxydefaulttargetgroup.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyDefaultTargetGroup +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + dbProxyName: example + region: us-east-2 + connectionPoolConfig: + - connectionBorrowTimeout: 60 + initQuery: SET x=1, y=2 + maxConnectionsPercent: 100 + maxIdleConnectionsPercent: 50 + sessionPinningFilters: + - EXCLUDE_VARIABLE_SETS + +--- diff --git a/examples/rds/postgres/postgres-proxyendpoint.yaml b/examples/rds/postgres/postgres-proxyendpoint.yaml new file mode 100644 index 0000000..8ed0408 --- /dev/null +++ b/examples/rds/postgres/postgres-proxyendpoint.yaml @@ -0,0 +1,19 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: ProxyEndpoint +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Proxy, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbProxyName: example + targetRole: READ_ONLY + vpcSubnetIds: + - subnet-085e9e289fcdffa8d + - subnet-0e16c787993d3b584 + - subnet-0cf69ebb0982d9ac6 + providerConfigRef: + name: default + +--- \ No newline at end of file diff --git a/examples/rds/postgres/postgres-snapshot.yaml b/examples/rds/postgres/postgres-snapshot.yaml new file mode 100644 index 0000000..0afb767 --- /dev/null +++ b/examples/rds/postgres/postgres-snapshot.yaml @@ -0,0 +1,14 @@ +apiVersion: rds.aws.kubedb.com/v1alpha1 +kind: Snapshot +metadata: + name: example + annotations: + upjet.kubedb.com/manual-intervention: "This resource has a reference to Instance, which needs manual intervention." +spec: + forProvider: + region: us-east-2 + dbInstanceIdentifierRef: + name: example + +--- + diff --git a/examples/secretsmanager/secret.yaml b/examples/secretsmanager/secret.yaml new file mode 100644 index 0000000..c85436a --- /dev/null +++ b/examples/secretsmanager/secret.yaml @@ -0,0 +1,15 @@ +apiVersion: secretsmanager.aws.kubedb.com/v1alpha1 +kind: Secret +metadata: + annotations: + meta.upbound.io/example-id: secretsmanager/v1alpha1/secret + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + name: example + region: us-east-2 + recoveryWindowInDays: 0 + description: "Created With KubdDB Provider" +--- \ No newline at end of file diff --git a/go.mod b/go.mod index 509961c..afd6af9 100644 --- a/go.mod +++ b/go.mod @@ -3,87 +3,146 @@ module kubedb.dev/provider-aws go 1.19 require ( - github.com/crossplane/crossplane-runtime v0.20.0-rc.0.0.20230406155702-4e1673b7141f - github.com/crossplane/crossplane-tools v0.0.0-20230327091744-4236bf732aa5 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 + dario.cat/mergo v1.0.0 + github.com/aws/aws-sdk-go-v2 v1.18.0 + github.com/aws/aws-sdk-go-v2/config v1.18.12 + github.com/aws/aws-sdk-go-v2/credentials v1.13.12 + github.com/aws/aws-sdk-go-v2/service/sts v1.18.11 + github.com/aws/smithy-go v1.13.5 + 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/go-ini/ini v1.67.0 + github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.25 + github.com/hashicorp/terraform-json v0.17.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 + github.com/hashicorp/terraform-provider-aws v0.0.0-00010101000000-000000000000 github.com/pkg/errors v0.9.1 - github.com/upbound/provider-aws v0.36.0 - github.com/upbound/upjet v0.9.0-rc.0.0.20230502154751-645d7260d814 gopkg.in/alecthomas/kingpin.v2 v2.2.6 - k8s.io/api v0.26.3 - k8s.io/apimachinery v0.26.3 - k8s.io/client-go v0.26.3 - sigs.k8s.io/controller-runtime v0.14.6 - sigs.k8s.io/controller-tools v0.11.3 + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 + sigs.k8s.io/controller-runtime v0.16.3 + sigs.k8s.io/controller-tools v0.13.0 ) require ( + github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect github.com/antchfx/xpath v1.2.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/armon/go-metrics v0.3.9 // indirect - github.com/armon/go-radix v1.0.0 // indirect + github.com/aws/aws-sdk-go v1.44.261 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29 // indirect + github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.19.12 // indirect + github.com/aws/aws-sdk-go-v2/service/account v1.10.6 // indirect + github.com/aws/aws-sdk-go-v2/service/acm v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/service/auditmanager v1.24.7 // indirect + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.1.4 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.11.11 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.20.11 // indirect + github.com/aws/aws-sdk-go-v2/service/comprehend v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/directoryservice v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.1.10 // indirect + github.com/aws/aws-sdk-go-v2/service/ec2 v1.97.0 // indirect + github.com/aws/aws-sdk-go-v2/service/fis v1.14.10 // indirect + github.com/aws/aws-sdk-go-v2/service/healthlake v1.15.11 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.19.12 // indirect + github.com/aws/aws-sdk-go-v2/service/identitystore v1.16.11 // indirect + github.com/aws/aws-sdk-go-v2/service/inspector2 v1.13.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ivschat v1.4.5 // indirect + github.com/aws/aws-sdk-go-v2/service/kendra v1.40.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lambda v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/medialive v1.31.4 // indirect + github.com/aws/aws-sdk-go-v2/service/oam v1.1.11 // indirect + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.2.4 // indirect + github.com/aws/aws-sdk-go-v2/service/pipes v1.2.6 // indirect + github.com/aws/aws-sdk-go-v2/service/rbin v1.8.11 // indirect + github.com/aws/aws-sdk-go-v2/service/rds v1.44.0 // indirect + github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.2.13 // indirect + github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.1.11 // indirect + github.com/aws/aws-sdk-go-v2/service/route53domains v1.14.10 // indirect + github.com/aws/aws-sdk-go-v2/service/s3control v1.31.5 // indirect + github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.11 // indirect + github.com/aws/aws-sdk-go-v2/service/securitylake v1.3.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sesv2 v1.17.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssm v1.36.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.15.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.21.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect + github.com/aws/aws-sdk-go-v2/service/transcribe v1.26.6 // indirect + github.com/aws/aws-sdk-go-v2/service/vpclattice v1.0.5 // indirect + github.com/aws/aws-sdk-go-v2/service/xray v1.16.11 // indirect + github.com/beevik/etree v1.1.4 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v3 v3.0.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cloudflare/circl v1.3.2 // indirect github.com/dave/jennifer v1.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.21.1 // indirect - github.com/gobuffalo/flect v0.3.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect + github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.20.0 // indirect + github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.26 // indirect + github.com/hashicorp/awspolicyequivalence v1.6.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.2.1 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.4 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/go-plugin v1.4.9 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.14.1 // indirect + github.com/hashicorp/hc-install v0.5.0 // indirect + github.com/hashicorp/hcl/v2 v2.16.2 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect - github.com/hashicorp/vault/api v1.5.0 // indirect - github.com/hashicorp/vault/sdk v0.4.1 // indirect - github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect + github.com/hashicorp/terraform-exec v0.18.1 // indirect + github.com/hashicorp/terraform-plugin-framework v1.2.0 // indirect + github.com/hashicorp/terraform-plugin-framework-timeouts v0.3.1 // indirect + github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.15.0 // indirect + github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect + github.com/hashicorp/terraform-plugin-mux v0.10.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.0 // indirect + github.com/hashicorp/terraform-svchost v0.1.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/iancoleman/strcase v0.2.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattbaird/jsonpatch v0.0.0-20200820163806-098863c1fc24 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -96,49 +155,57 @@ require ( 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/oklog/run v1.0.0 // indirect - github.com/pierrec/lz4 v2.5.2+incompatible // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/cobra v1.6.1 // indirect + github.com/oklog/run v1.1.0 // 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 + github.com/prometheus/procfs v0.10.1 // indirect + github.com/shopspring/decimal v1.3.1 // indirect + github.com/spf13/afero v1.10.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tmccombs/hcl2json v0.3.3 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect - github.com/zclconf/go-cty v1.11.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.2.0 // indirect - golang.org/x/mod v0.7.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/zclconf/go-cty v1.13.2 // indirect + github.com/zclconf/go-cty-yaml v1.0.3 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.4.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.14.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd // indirect - google.golang.org/grpc v1.50.1 // indirect - google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/grpc v1.59.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.3 // indirect - k8s.io/component-base v0.26.3 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // 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 sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace golang.org/x/exp => golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + +replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraform-provider-aws v0.0.0-20231026091456-f2d38ee240d7 diff --git a/go.sum b/go.sum index ef4c7a6..5e6737c 100644 --- a/go.sum +++ b/go.sum @@ -35,141 +35,240 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb h1:Vx1Bw/nGULx+FuY7Sw+8ZDpOx9XOdA+mOfo678SqkbU= +github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/htmlquery v1.2.4 h1:qLteofCMe/KGovBI6SQgmou2QNyedFUW+pE+BpeZ494= github.com/antchfx/htmlquery v1.2.4/go.mod h1:2xO6iu3EVWs7R2JYqBbp8YzG50gj/ofqs5/0VZoDZLc= github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8= github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aws/aws-sdk-go v1.44.261 h1:PcTMX/QVk+P3yh2n34UzuXDF5FS2z5Lse2bt+r3IpU4= +github.com/aws/aws-sdk-go v1.44.261/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v1.17.4/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2 v1.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= +github.com/aws/aws-sdk-go-v2/config v1.18.12 h1:fKs/I4wccmfrNRO9rdrbMO1NgLxct6H9rNMiPdBxHWw= +github.com/aws/aws-sdk-go-v2/config v1.18.12/go.mod h1:J36fOhj1LQBr+O4hJCiT8FwVvieeoSGOtPuvhKlsNu8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.12 h1:Cb+HhuEnV19zHRaYYVglwvdHGMJWbdsyP4oHhw04xws= +github.com/aws/aws-sdk-go-v2/credentials v1.13.12/go.mod h1:37HG2MBroXK3jXfxVGtbM2J48ra2+Ltu+tmwr/jO0KA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.22/go.mod h1:YGSIJyQ6D6FjKMQh16hVFSIUD54L4F7zTGePqYMYYJU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 h1:jJPgroehGvjrde3XufFIJUZVK5A2L9a3KwSFgKy9n8w= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.28/go.mod h1:3lwChorpIM/BhImY/hy+Z6jekmN92cXGPI1QJasVPYY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 h1:kG5eQilShqmJbv11XL1VpyDbaEJzWxd4zRiCG30GSn4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.22/go.mod h1:EqK7gVrIGAHyZItrD1D8B0ilgwMD1GiWAmbU4u/JHNk= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 h1:vFQlirhuM8lLlpI7imKOMsjdQLuN9CPi+k44F/OFVsk= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29 h1:J4xhFd6zHhdF9jPP0FQJ6WknzBboGMBNjKOv4iTuw4A= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29/go.mod h1:TwuqRBGzxjQJIwH16/fOZodwXt2Zxa9/cwJC5ke4j7s= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.19.12 h1:4jgaIiXEPwMogu89ah7MGeYZA8niMwH3KxymzSpAIkw= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.19.12/go.mod h1:05NIzmwCjR1k1Hhx3RPSkKFRdO9AyHuEJCEgTZG8Ta4= +github.com/aws/aws-sdk-go-v2/service/account v1.10.6 h1:u1B79rnwVrbXUvPXHz42GYq29/U/5TV/H6Fb5Ie4leM= +github.com/aws/aws-sdk-go-v2/service/account v1.10.6/go.mod h1:sxLUXrqYXCfOBPBBk0azv+UOoFsnrQ9G1ZcICrb9O+0= +github.com/aws/aws-sdk-go-v2/service/acm v1.17.11 h1:n/iAVMTf0VN8m0APSXKlTIFnpumXCrZNUiiVHb74z+w= +github.com/aws/aws-sdk-go-v2/service/acm v1.17.11/go.mod h1:DPf8lxAWIM/y21N36FGUUoG7KH5dzW20sk/l1yGsLt8= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.24.7 h1:QKbTGDu2xnH4YVN9soA2V4PJqbbv7lp5rXgSgw1u/nc= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.24.7/go.mod h1:HtY67X+mN8oq2UMidOuIcXn+XWFyGYnpTvEoNGQBxc0= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.1.4 h1:rUKIsoew72A/gZkBrSApQSjvksEKLRWkUE7jlK7YkpE= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.1.4/go.mod h1:B+j10S5V7q7VfEAMYAfCTHYJg2e6AVG/wDYkTo6nE4s= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.11.11 h1:ikjuf/kPlkxJUu7ueCODgT6uEcCf5l/+MMdcomgtZ7I= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.11.11/go.mod h1:/hg0Z2APD1zFe758rOTwIuIQEe7ohaodrhY906f4ISs= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.20.11 h1:v50ZdTUw4Ak1Y58bnUt5Dw1k38bdU0ixZ8QGpRq3Shg= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.20.11/go.mod h1:5k59EsYR4orIPOQrGAKtQjIsM4Yw9qfxMeSs6+/UVN0= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.24.2 h1:l2X9ym1JpVOhqr6lKFQ3Bf/94f8KnTCJz99nBob9J9g= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.24.2/go.mod h1:YDZOE9XpbohvywpWpxDCPIEWlpALTsR+o6Ny6UgHXeE= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.23.1 h1:f5ECHh1schmL5jwaJuNQjX+/YvVA4V7c4yx69lzsQJM= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.23.1/go.mod h1:5kTfX+bDwent5HUSiSwMtYSDw57gZ7hkQSv+x2jJmtg= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.17.1 h1:aBrA5bDK3ou4JqoHUCp01FaBPLgHQalQr1w0mTBQXyk= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.17.1/go.mod h1:tjEH79gyftglvYJMPGSachjqhthFaVYjco94mJ5ANcY= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.1.10 h1:b9yLKuY9L43WOJOHAj6OApgNTgze8D4akNbFhCnXUQQ= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.1.10/go.mod h1:PjV/8ElvXTf1jbcjaGvUphvb8Sz4/lTP87GFhQrZGbk= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.97.0 h1:glGFVlA0MVrOpDF+KsVZZA/QCwykYPanYMW0DoIJN34= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.97.0/go.mod h1:L3ZT0N/vBsw77mOAawXmRnREpEjcHd2v5Hzf7AkIH8M= +github.com/aws/aws-sdk-go-v2/service/fis v1.14.10 h1:uDfGkU0W6mO34XFbXgc9sFjOXTNA6IRoeeoPkCnZnx4= +github.com/aws/aws-sdk-go-v2/service/fis v1.14.10/go.mod h1:UFu/qHPW17t5CcwChAc76mSq3v/bRyzhqjwiTcqlwLI= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.15.11 h1:/2EzMFJcYe87txoIlpM+qW9I3lH5Qro+DumdRuXCrb4= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.15.11/go.mod h1:n1IxBDIRdNPVLrEDqwDSZSF60FkFIO43gWVMZo4Y/Rk= +github.com/aws/aws-sdk-go-v2/service/iam v1.19.12 h1:JH1H7POlsZt41X9JYIBLZoXW0Qv+WOuC48xsafsls2Q= +github.com/aws/aws-sdk-go-v2/service/iam v1.19.12/go.mod h1:kAnokExGCYs7zfvZEZdFHvQ/x4ZKIci0Raps6mZI1Ag= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.16.11 h1:lXvr+mWzICOdOWQAKGPpAgSuA3lw3XEnzuCUMBVFjgs= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.16.11/go.mod h1:q1wr4mV/OaSB53lfrCL4al7J4ApwOZcy2F8nQ2iTTlw= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.13.0 h1:YtnOEbbYqFi6UTCZ1s1YjPDj8q0vOr8qv4UaUemAvc8= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.13.0/go.mod h1:DVqRsK8FPNPZmd6XIITp+vakn0DwcfqO/Luo9fdMUZk= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.22/go.mod h1:xt0Au8yPIwYXf/GYPy/vl4K3CgwhfQMYbrH7DlUUIws= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 h1:0iKliEXAcCa2qVtRs7Ot5hItA2MsufrphbRFlz1Owxo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 h1:NbWkRxEEIRSCqxhsHQuMiTH7yo+JZW1gp8v3elSVMTQ= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2/go.mod h1:4tfW5l4IAB32VWCDEBxCRtR9T4BWy4I4kr1spr8NgZM= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.4.5 h1:oaAviqCkBc/azk44qUP+w0ZkiNsfFHq+7sdH8N7bKUY= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.4.5/go.mod h1:hUIzI/1VZP15FYdPE7tBFI/gk9iD1LlEOFMSJTrJZN8= +github.com/aws/aws-sdk-go-v2/service/kendra v1.40.1 h1:808yGPE8AM5hoNq/eSFTKGRbc6C72VjIYNNFkUwwMas= +github.com/aws/aws-sdk-go-v2/service/kendra v1.40.1/go.mod h1:00b/aokrZ0r4fUsMP9RSOL9bvxTCCRCOeUy5o0lyqrA= +github.com/aws/aws-sdk-go-v2/service/lambda v1.34.1 h1:1Q4cSbM9p1aLhs4GKuvyyj46YwJ/E0/2kubFViF4NtA= +github.com/aws/aws-sdk-go-v2/service/lambda v1.34.1/go.mod h1:i23nHcGEyswthctBfhEO1agGpM5Uyh83aSmSB6DmdCk= +github.com/aws/aws-sdk-go-v2/service/medialive v1.31.4 h1:EMIWrz5dNgkqAKUPe6xTLvzwLt2RIRN1P5D8Nrl4XkQ= +github.com/aws/aws-sdk-go-v2/service/medialive v1.31.4/go.mod h1:3Ttv/NVxQ8CitwL/sZdxSJHzStb75XQO+gvBwOC3Sj8= +github.com/aws/aws-sdk-go-v2/service/oam v1.1.11 h1:dRgn7qpyEtXcP0prnPyaTUTiCQsowO++Cu9B5wlZRtI= +github.com/aws/aws-sdk-go-v2/service/oam v1.1.11/go.mod h1:4y8cA064jS3qZpi0UJbWi7oYVK/2r+i19WzZKbVc984= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.2.4 h1:ghpmRvcyW4vkWAEn2rPHafqAmCvxrEBSo1lMN0XgTH0= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.2.4/go.mod h1:LMAikx29Mp71h/luaesJvO3//aeMPWu6MRE4eFfbWOU= +github.com/aws/aws-sdk-go-v2/service/pipes v1.2.6 h1:dSXPRQShC1+i/d7k0w8hHZWX/44Z/hfWgIYq5MSLajA= +github.com/aws/aws-sdk-go-v2/service/pipes v1.2.6/go.mod h1:tkKKTXm4WD7VCL5yUDvtvGZ8xaqbjk2WMJZLLetbJ0o= +github.com/aws/aws-sdk-go-v2/service/rbin v1.8.11 h1:I1eHgy/bq1ZaNKVD0yuD8gM3SjxUPh4NbsyT8wAGzqw= +github.com/aws/aws-sdk-go-v2/service/rbin v1.8.11/go.mod h1:kdlIXWL9Akk4tj/u9GMnO17ImBEvrhQmb0OnJ7LokQY= +github.com/aws/aws-sdk-go-v2/service/rds v1.44.0 h1:50lSF6RpPN5stt+nUbidwGzm9E1sKxBZJedU6nxu8RA= +github.com/aws/aws-sdk-go-v2/service/rds v1.44.0/go.mod h1:rS6T0DrjdZ5LDr8ZC/J9iZdD1oSbie5reWWzqv5zLOw= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.2.13 h1:9uj47asgRDlwNqZIlzDt5HjnD2wakHy4yUXSz3e9V0M= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.2.13/go.mod h1:2nZFXAepd6OTyH90JTsgjdgq4K6+jVh/5nXtiEpjHtw= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.1.11 h1:uRgt5aLA6isQ/K4CJI6Oj8dmn0gyP1q8FES4OcRZ+pY= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.1.11/go.mod h1:BeRwkhH4kXGCbloxpE5tApOhFa8O8Mn12m5onxV3mEY= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.14.10 h1:BSgJnMWjJtrnZeRnJIMt+YheRxNESIenlZL/xP2Xtt4= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.14.10/go.mod h1:ZCAB0DgknPFchQTI0rWjWlLe6U/2eDBqPMzVAjkZuzQ= +github.com/aws/aws-sdk-go-v2/service/s3control v1.31.5 h1:2kBpC4G+0TURGBtHcUin60QgD1pegxxZVFd7mTw8Hx0= +github.com/aws/aws-sdk-go-v2/service/s3control v1.31.5/go.mod h1:+J0Qiu0bVEAUOZWMa1fhnviElPPkyCNDJ7jy55YlXrw= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.11 h1:i3skYUCdrSYnX2oaO+tIMHocL0K9PedV6giheTlhH+U= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.11/go.mod h1:83KK/1JoGYanQ37zK6n4BMUr1jyBAgrYingKvg+iipA= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.3.6 h1:FYPnfgYoJm0SZ/pRmIvys7UlyQKTOZGh+WdIPTgq67g= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.3.6/go.mod h1:shJshCeJ7y5gV4oxRZDjTCdDLFq7TeTbvVKaGIPDtz8= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.17.6 h1:eso9dMlJsglegMQQIxzLCmo5IBLQ2zwAXznlPwggVBQ= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.17.6/go.mod h1:3d0bMRIeTba1O79ZBgYJXBMLu7IWaGDAki1QfqNKIYo= +github.com/aws/aws-sdk-go-v2/service/ssm v1.36.4 h1:3AjvCuRS8OnNVRC/UBagp1Jo2feR94+VAIKO4lz8gOQ= +github.com/aws/aws-sdk-go-v2/service/ssm v1.36.4/go.mod h1:p6MaesK9061w6NTiFmZpUzEkKUY5blKlwD2zYyErxKA= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.15.4 h1:pax0tO/C4sBZ2nd6QsFGDssGVAMHQO5owbClakttX84= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.15.4/go.mod h1:1LFRcVC7L8JhAlNHwc+KihmC0naHTRA+0ldK+qFh2w4= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.21.4 h1:7hO9021AxJ0pnnXOMRrwhZwV/jh7YR1OE0xZ/YgKhUc= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.21.4/go.mod h1:Q7T6TJnkts22esEfdhktumcr7YhcFMWUCQ9OvZXHdCQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.1/go.mod h1:IgV8l3sj22nQDd5qcAGY0WenwCzCphqdbFOpfktZPrI= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 h1:UBQjaMTCKwyUYwiVnUt6toEJwGXsLBI6al083tpjJzY= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1/go.mod h1:O1YSOg3aekZibh2SngvCRRG+cRHKKlYgxf/JBF/Kr/k= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 h1:PkHIIJs8qvq0e5QybnZoG1K/9QTrLr9OsqCIo59jOBA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.3/go.mod h1:b+psTJn33Q4qGoDaM7ZiOVVG8uVjGI6HaZ8WBHdgDgU= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.11 h1:uBE+Zj478pfxV98L6SEpvxYiADNjTlMNY714PJLE7uo= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.11/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.26.6 h1:I2Y2Y8V+uq2ZoD+yTxjKYuPOTtScHMXUWdbuCdjNZy4= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.26.6/go.mod h1:VgAk4W80KzgqmBdm1jk+FjqiD5VgAz0FGvqECq7q79I= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.0.5 h1:ZQizySv5AeKbYYtkDiUcxSnwTqAJ4URIxdoLWfZ7rhw= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.0.5/go.mod h1:1F8VKjH2cx/t6iY//vQvuVI4jD9hJrxbEcCjUmJqlyQ= +github.com/aws/aws-sdk-go-v2/service/xray v1.16.11 h1:mYQ9hVlxQgd37r8evKvCUo+ny3AfKbFYvUQaD48LSbs= +github.com/aws/aws-sdk-go-v2/service/xray v1.16.11/go.mod h1:EK5gjZWl5j6ttgiEaU++Y63VQ0TjiCWkl9wd0S+MjNM= +github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/beevik/etree v1.1.4 h1:34PFKrJczQ1qXVC4QCqvY0Iz7m3xu89OShTjYRl4Nbk= +github.com/beevik/etree v1.1.4/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zVZWFc= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.2 h1:VWp8dY3yH69fdM7lM6A1+NhhVoDu9vqK0jOgmkQHFWk= +github.com/cloudflare/circl v1.3.2/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v0.20.0-rc.0.0.20230406155702-4e1673b7141f h1:wDRr6gaoiQstEdddrn0B5SSSgzdXreOQAbdmRH+9JeI= -github.com/crossplane/crossplane-runtime v0.20.0-rc.0.0.20230406155702-4e1673b7141f/go.mod h1:ebtUpmconMy8RKUEhrCXTUFSOpfGQqbKM2E+rjCCYJo= -github.com/crossplane/crossplane-tools v0.0.0-20230327091744-4236bf732aa5 h1:K9H55wcwfXcGroZApIgPmIGRGuZLszsLDCYB12p2yMo= -github.com/crossplane/crossplane-tools v0.0.0-20230327091744-4236bf732aa5/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/crossplane-runtime v1.14.1 h1:TCa7R1N4bDGHjsLhiRxR/mUhwmistlMACHm0kiiYKck= +github.com/crossplane/crossplane-runtime v1.14.1/go.mod h1:aOP+5W2wKpvthVs3pFNbVOe1jwrKYbJho0ThGNCVz9o= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/upjet v1.0.0 h1:/R509m+c5XTLsd9oXTEaLj2yIbM/EUmG34XOou1dugM= +github.com/crossplane/upjet v1.0.0/go.mod h1:t9etxIdYaxgyvFPBToikm5zBHi8RIpX8N4mTH77lQFM= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= -github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= +github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= +github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= +github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= -github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -203,15 +302,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -223,8 +320,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -241,123 +339,114 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.20.0 h1:xc1OYpWvNo6dhnzemfjwtbNxeu3Ag4Wr6yT8BOo0/q0= +github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.20.0/go.mod h1:cdTE6F2pCKQobug+RqRaQp7Kz9hIEqiSvpPmb6E5G1w= +github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.25 h1:C/rKj4J49TzpuWZG8FCzTJeMHB5YjeIE7/RyanYfrYA= +github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.25/go.mod h1:wzIwDL7rJ5Eb/PsdohG3Mpd/Gfy6wo07XytpTpTdQ0M= +github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.26 h1:6Vs31BbjeG4oRO/MdvAO6XWOfv1HxcVbXJq8nwYr1cw= +github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.26/go.mod h1:phrmI8aW0zJ2ZN8DJPZVMac8TwfQ/wB37J6gCHr9hxU= +github.com/hashicorp/awspolicyequivalence v1.6.0 h1:7aadmkalbc5ewStC6g3rljx1iNvP4QyAhg2KsHx8bU8= +github.com/hashicorp/awspolicyequivalence v1.6.0/go.mod h1:9IOaIHx+a7C0NfUNk1A93M7kHd5rJ19aoUx37LZGC14= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= +github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 h1:78ki3QBevHwYrVxnyVeaEz+7WtifHhauYF23es/0KlI= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 h1:nd0HIW15E6FG1MsnArYaHfuw9C2zgzM8LxkG5Ty/788= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-plugin v1.4.9 h1:ESiK220/qE0aGxWdzKIvRH69iLiuN/PjoLTm69RoWtU= +github.com/hashicorp/go-plugin v1.4.9/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0= +github.com/hashicorp/hc-install v0.5.0/go.mod h1:JyzMfbzfSBSjoDCRPna1vi/24BEDxFaCPfdHtM5SCdo= github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= -github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= -github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= +github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= -github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y= -github.com/hashicorp/vault/api v1.5.0 h1:Bp6yc2bn7CWkOrVIzFT/Qurzx528bdavF3nz590eu28= -github.com/hashicorp/vault/api v1.5.0/go.mod h1:LkMdrZnWNrFaQyYYazWVn7KshilfDidgVBq6YiTq/bM= -github.com/hashicorp/vault/sdk v0.4.1 h1:3SaHOJY687jY1fnB61PtL0cOkKItphrbLmux7T92HBo= -github.com/hashicorp/vault/sdk v0.4.1/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaakYkhZRoVuhj0= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4= +github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= +github.com/hashicorp/terraform-json v0.17.0 h1:EiA1Wp07nknYQAiv+jIt4dX4Cq5crgP+TsTE45MjMmM= +github.com/hashicorp/terraform-json v0.17.0/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-framework v1.2.0 h1:MZjFFfULnFq8fh04FqrKPcJ/nGpHOvX4buIygT3MSNY= +github.com/hashicorp/terraform-plugin-framework v1.2.0/go.mod h1:nToI62JylqXDq84weLJ/U3umUsBhZAaTmU0HXIVUOcw= +github.com/hashicorp/terraform-plugin-framework-timeouts v0.3.1 h1:5GhozvHUsrqxqku+yd0UIRTkmDLp2QPX5paL1Kq5uUA= +github.com/hashicorp/terraform-plugin-framework-timeouts v0.3.1/go.mod h1:ThtYDU8p6sJ9+SI+TYxXrw28vXxgBwYOpoPv1EojSJI= +github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 h1:4L0tmy/8esP6OcvocVymw52lY0HyQ5OxB7VNl7k4bS0= +github.com/hashicorp/terraform-plugin-framework-validators v0.10.0/go.mod h1:qdQJCdimB9JeX2YwOpItEu+IrfoJjWQ5PhLpAOMDQAE= +github.com/hashicorp/terraform-plugin-go v0.15.0 h1:1BJNSUFs09DS8h/XNyJNJaeusQuWc/T9V99ylU9Zwp0= +github.com/hashicorp/terraform-plugin-go v0.15.0/go.mod h1:tk9E3/Zx4RlF/9FdGAhwxHExqIHHldqiQGt20G6g+nQ= +github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= +github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= +github.com/hashicorp/terraform-plugin-mux v0.10.0 h1:VejY1BffxGy2iYOaa8DDHavY4k9jbvAE8F3lhruspKY= +github.com/hashicorp/terraform-plugin-mux v0.10.0/go.mod h1:9sdnpmY20xIsl4ItsfODZYE+MgpSy/osXpSf+RwaZCY= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= +github.com/hashicorp/terraform-registry-address v0.2.0 h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s= +github.com/hashicorp/terraform-registry-address v0.2.0/go.mod h1:478wuzJPzdmqT6OGbB/iH82EDcI8VFM4yujknh/1nIs= +github.com/hashicorp/terraform-svchost v0.1.0 h1:0+RcgZdZYNd81Vw7tu62g9JiLLvbOigp7QtyNh6CjXk= +github.com/hashicorp/terraform-svchost v0.1.0/go.mod h1:ut8JaH0vumgdCfJaihdcZULqkAwHdQNwNH7taIDdsZM= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -365,28 +454,25 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mattbaird/jsonpatch v0.0.0-20200820163806-098863c1fc24 h1:uYuGXJBAi1umT+ZS4oQJUgKtfXCAYTR+n9zw1ViT0vA= +github.com/mattbaird/jsonpatch v0.0.0-20200820163806-098863c1fc24/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -394,16 +480,11 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -412,29 +493,19 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.2 h1:J/tulyYK6JwBldPViHJReihxxZ+22FHs0piGjQAvoUE= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -442,59 +513,38 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -503,24 +553,30 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/upbound/provider-aws v0.36.0 h1:uPQDPMwRyrUhlEgkGTtUPUXInIUxEEW/QKhTM+MYxcc= -github.com/upbound/provider-aws v0.36.0/go.mod h1:c8VsJOqj3jsh0YdQidxOIEU51DGXtjMwr4NltBJtpdk= -github.com/upbound/upjet v0.9.0-rc.0.0.20230502154751-645d7260d814 h1:lsVgo6tcAXmdHCoPgo0HT67rtYQ4DRzUeNJ2lh9Qhm0= -github.com/upbound/upjet v0.9.0-rc.0.0.20230502154751-645d7260d814/go.mod h1:CWxJ9YTMy7q+bDc2W504ocL/ZzBmWabwwcRjIaP7CKc= +github.com/upbound/terraform-provider-aws v0.0.0-20231026091456-f2d38ee240d7 h1:hOLIvZeun8SvbrjCg78hYGQIS7a/iwsIeJDXhKd2qmQ= +github.com/upbound/terraform-provider-aws v0.0.0-20231026091456-f2d38ee240d7/go.mod h1:VC/cWYvL0CQ2QApMzLWtf5xkbEmaabKO0Hoi49B62AE= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= +github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -532,53 +588,49 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= -github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= +github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= +github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= +github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE= -golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -590,24 +642,22 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -615,7 +665,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -639,13 +688,14 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -655,10 +705,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -670,27 +718,21 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -704,8 +746,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -713,27 +753,33 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -743,19 +789,19 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -763,10 +809,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -778,7 +821,6 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -802,14 +844,17 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -837,7 +882,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -861,7 +905,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -875,10 +918,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd h1:OjndDrsik+Gt+e6fs45z9AxiewiKyLKYpA45W5Kpkks= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -892,15 +933,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -913,9 +950,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -923,23 +959,21 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/dnaeon/go-vcr.v3 v3.1.2 h1:F1smfXBqQqwpVifDfUBQG6zzaGjzT+EnVZakrOdr5wA= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -950,31 +984,31 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= -k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= -k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= -k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= -k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 h1:xMMXJlJbsU8w3V5N2FLDQ8YgU8s1EoULdbQBcAeNJkY= -k8s.io/utils v0.0.0-20230313181309-38a27ef9d749/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/controller-tools v0.11.3 h1:T1xzLkog9saiyQSLz1XOImu4OcbdXWytc5cmYsBeBiE= -sigs.k8s.io/controller-tools v0.11.3/go.mod h1:qcfX7jfcfYD/b7lAhvqAyTbt/px4GpvN88WKLFFv7p8= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= +sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/hack/embed.go b/hack/embed.go new file mode 100644 index 0000000..3163311 --- /dev/null +++ b/hack/embed.go @@ -0,0 +1,8 @@ +package hack + +import _ "embed" + +// MainTemplate is populated with provider main program template. +// +//go:embed main.go.tmpl +var MainTemplate string diff --git a/hack/main.go.tmpl b/hack/main.go.tmpl new file mode 100644 index 0000000..9c9f2ef --- /dev/null +++ b/hack/main.go.tmpl @@ -0,0 +1,117 @@ +/* +Copyright 2021 Upbound Inc. +*/ + +package main + +import ( + "context" + "os" + "path/filepath" + "time" + + xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller" + "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/terraform" + "gopkg.in/alecthomas/kingpin.v2" + kerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/leaderelection/resourcelock" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + "kubedb.dev/provider-aws/apis" + "kubedb.dev/provider-aws/apis/v1alpha1" + "kubedb.dev/provider-aws/config" + "kubedb.dev/provider-aws/internal/clients" + "kubedb.dev/provider-aws/internal/controller" + "kubedb.dev/provider-aws/internal/features" +) + +func main() { + var ( + app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for AWS").DefaultEnvars() + debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() + syncPeriod = app.Flag("sync", "Controller manager sync period such as 300ms, 1.5h, or 2h45m").Short('s').Default("1h").Duration() + leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() + terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() + providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() + providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() + + namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String() + enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool() + enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("false").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() + ) + + kingpin.MustParse(app.Parse(os.Args[1:])) + + zl := zap.New(zap.UseDevMode(*debug)) + log := logging.NewLogrLogger(zl.WithName("provider-aws")) + if *debug { + // The controller-runtime runs with a no-op logger by default. It is + // *very* verbose even at info level, so we only provide it a real + // logger when we're running in debug mode. + ctrl.SetLogger(zl) + } + + log.Debug("Starting", "sync-period", syncPeriod.String()) + + cfg, err := ctrl.GetConfig() + kingpin.FatalIfError(err, "Cannot get API server rest config") + + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + LeaderElection: *leaderElection, + LeaderElectionID: "crossplane-leader-election-provider-aws", + SyncPeriod: syncPeriod, + LeaderElectionResourceLock: resourcelock.LeasesResourceLock, + LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), + RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), + }) + kingpin.FatalIfError(err, "Cannot create controller manager") + kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") + o := tjcontroller.Options{ + Options: xpcontroller.Options{ + Logger: log, + GlobalRateLimiter: ratelimiter.NewGlobal(*maxReconcileRate), + PollInterval: 1 * time.Minute, + MaxConcurrentReconciles: 1, + }, + Provider: config.GetProvider(), + // use the following WorkspaceStoreOption to enable the shared gRPC mode + // terraform.WithProviderRunner(terraform.NewSharedProvider(log, os.Getenv("TERRAFORM_NATIVE_PROVIDER_PATH"), terraform.WithNativeProviderArgs("-debuggable"))) + WorkspaceStore: terraform.NewWorkspaceStore(log), + SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion), + } + + if *enableExternalSecretStores { + o.SecretStoreConfigGVK = &v1alpha1.StoreConfigGroupVersionKind + log.Info("Alpha feature enabled", "flag", features.EnableAlphaExternalSecretStores) + + // Ensure default store config exists. + kingpin.FatalIfError(resource.Ignore(kerrors.IsAlreadyExists, mgr.GetClient().Create(context.Background(), &v1alpha1.StoreConfig{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default", + }, + Spec: v1alpha1.StoreConfigSpec{ + // NOTE(turkenh): We only set required spec and expect optional + // ones to properly be initialized with CRD level default values. + SecretStoreConfig: xpv1.SecretStoreConfig{ + DefaultScope: *namespace, + }, + }, + })), "cannot create default store config") + } + + if *enableManagementPolicies { + o.Features.Enable(features.EnableAlphaManagementPolicies) + log.Info("Alpha feature enabled", "flag", features.EnableAlphaManagementPolicies) + } + + kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup AWS controllers") + kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") +} diff --git a/internal/clients/aws.go b/internal/clients/aws.go index f7f3d7a..e650cad 100644 --- a/internal/clients/aws.go +++ b/internal/clients/aws.go @@ -1,99 +1,340 @@ /* -Copyright 2021 Upbound Inc. +Copyright 2022 Upbound Inc. */ package clients import ( "context" - "encoding/json" - "github.com/crossplane/crossplane-runtime/pkg/fieldpath" - "k8s.io/apimachinery/pkg/runtime" + "os" + "reflect" + "unsafe" + tfawsbase "github.com/hashicorp/aws-sdk-go-base/v2" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-aws/xpprovider" + + "github.com/aws/aws-sdk-go-v2/aws" + "k8s.io/apimachinery/pkg/types" + + "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/upjet/pkg/terraform" "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/upbound/upjet/pkg/terraform" - "kubedb.dev/provider-aws/apis/v1beta1" ) const ( - // error messages - errNoProviderConfig = "no providerConfigRef provided" - errGetProviderConfig = "cannot get referenced ProviderConfig" - errTrackUsage = "cannot track ProviderConfig usage" - errExtractCredentials = "cannot extract credentials" - errUnmarshalCredentials = "cannot unmarshal aws credentials as JSON" - errRegionNotFound = "can not found region for terraform provider config" - - accessKeyID = "access_key" - secretAccessKey = "secret_key" - keyRegion = "region" + // Terraform provider configuration keys for AWS credentials. + keyRegion = "region" + keyAccountId = "account_id" + keySessionToken = "token" + keyAccessKeyID = "access_key" + keySecretAccessKey = "secret_key" + keyAssumeRoleWithWebIdentity = "assume_role_with_web_identity" + keyRoleArn = "role_arn" + keySessionName = "session_name" + keyWebIdentityTokenFile = "web_identity_token_file" + keyAssumeRole = "assume_role" + keyTags = "tags" + keyTransitiveTagKeys = "transitive_tag_keys" + keyExternalID = "external_id" + keySkipCredsValidation = "skip_credentials_validation" + keyS3UsePathStyle = "s3_use_path_style" + keySkipMetadataApiCheck = "skip_metadata_api_check" + keySkipRegionValidation = "skip_region_validation" + keySkipReqAccountId = "skip_requesting_account_id" + keyEndpoints = "endpoints" ) -// TerraformSetupBuilder builds Terraform a terraform.SetupFn function which -// returns Terraform provider setup configuration -func TerraformSetupBuilder(version, providerSource, providerVersion string) terraform.SetupFn { - return func(ctx context.Context, client client.Client, mg resource.Managed) (terraform.Setup, error) { +type SetupConfig struct { + NativeProviderPath *string + NativeProviderSource *string + NativeProviderVersion *string + TerraformVersion *string + DefaultScheduler terraform.ProviderScheduler + TerraformProvider *schema.Provider +} + +func SelectTerraformSetup(log logging.Logger, config *SetupConfig) terraform.SetupFn { // nolint:gocyclo + return func(ctx context.Context, c client.Client, mg resource.Managed) (terraform.Setup, error) { + pc := &v1beta1.ProviderConfig{} + var err error + if err = c.Get(ctx, types.NamespacedName{Name: mg.GetProviderConfigReference().Name}, pc); err != nil { + return terraform.Setup{}, errors.Wrapf(err, "cannot get referenced Provider: %s", mg.GetProviderConfigReference().Name) + } ps := terraform.Setup{ - Version: version, + Version: *config.TerraformVersion, Requirement: terraform.ProviderRequirement{ - Source: providerSource, - Version: providerVersion, + Source: *config.NativeProviderSource, + Version: *config.NativeProviderVersion, }, + Scheduler: config.DefaultScheduler, } - - configRef := mg.GetProviderConfigReference() - if configRef == nil { - return ps, errors.New(errNoProviderConfig) + account := "000000000" + if !pc.Spec.SkipCredsValidation { + account, err = getAccountId(ctx, c, mg) + if err != nil { + return terraform.Setup{}, errors.Wrap(err, "cannot get account id") + } } - pc := &v1beta1.ProviderConfig{} - if err := client.Get(ctx, types.NamespacedName{Name: configRef.Name}, pc); err != nil { - return ps, errors.Wrap(err, errGetProviderConfig) + + ps.ClientMetadata = map[string]string{ + keyAccountId: account, } - t := resource.NewProviderConfigUsageTracker(client, &v1beta1.ProviderConfigUsage{}) - if err := t.Track(ctx, mg); err != nil { - return ps, errors.Wrap(err, errTrackUsage) + if len(pc.Spec.AssumeRoleChain) > 1 || pc.Spec.Endpoint != nil { + err = DefaultTerraformSetupBuilder(ctx, c, mg, pc, &ps) + if err != nil { + return terraform.Setup{}, errors.Wrap(err, "cannot build terraform configuration") + } + // we cannot use the shared scheduler here. + // We will force a workspace scheduler if we can configure one. + if len(*config.NativeProviderPath) != 0 { + ps.Scheduler = terraform.NewWorkspaceProviderScheduler(log, terraform.WithNativeProviderPath(*config.NativeProviderPath), terraform.WithNativeProviderName("registry.terraform.io/"+*config.NativeProviderSource)) + } + } else { + err = pushDownTerraformSetupBuilder(ctx, c, mg, pc, &ps) + if err != nil { + return terraform.Setup{}, errors.Wrap(err, "cannot build terraform configuration") + } } - data, err := resource.CommonCredentialExtractor(ctx, pc.Spec.Credentials.Source, client, pc.Spec.Credentials.CommonCredentialSelectors) + awsConfig, err := configureNoForkAWSClient(ctx, c, mg, pc, &ps) if err != nil { - return ps, errors.Wrap(err, errExtractCredentials) + return terraform.Setup{}, errors.Wrap(err, "could not configure no-fork AWS client") } - creds := map[string]string{} - if err := json.Unmarshal(data, &creds); err != nil { - return ps, errors.Wrap(err, errUnmarshalCredentials) + p := config.TerraformProvider.Meta() + tfClient, diag := awsConfig.GetClient(ctx, &xpprovider.AWSClient{ + // #nosec G103 + ServicePackages: (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(p).Pointer())).ServicePackages, + }) + if diag != nil && diag.HasError() { + return terraform.Setup{}, errors.Errorf("failed to configure the AWS client: %v", diag) } + ps.Meta = tfClient + + return ps, nil + } +} + +func pushDownTerraformSetupBuilder(ctx context.Context, c client.Client, mg resource.Managed, pc *v1beta1.ProviderConfig, ps *terraform.Setup) error { //nolint:gocyclo + if len(pc.Spec.AssumeRoleChain) > 1 || pc.Spec.Endpoint != nil { + return errors.New("shared scheduler cannot be used because the length of assume role chain array " + + "is more than 1 or endpoint configuration is not nil") + } + + cfg, err := getAWSConfig(ctx, c, mg) + if err != nil { + return errors.Wrap(err, "cannot get AWS config") + } + ps.Configuration = map[string]any{ + keyRegion: cfg.Region, + } - region, err := getRegion(mg) + switch s := pc.Spec.Credentials.Source; s { //nolint:exhaustive + case authKeyWebIdentity: + if pc.Spec.Credentials.WebIdentity == nil { + return errors.New(`spec.credentials.webIdentity of ProviderConfig cannot be nil when the credential source is "WebIdentity"`) + } + ps.Configuration[keyAssumeRoleWithWebIdentity] = map[string]any{ + keyRoleArn: aws.ToString(pc.Spec.Credentials.WebIdentity.RoleARN), + keyWebIdentityTokenFile: os.Getenv(envWebIdentityTokenFile), + } + if pc.Spec.Credentials.WebIdentity.RoleSessionName != "" { + ps.Configuration[keySessionName] = pc.Spec.Credentials.WebIdentity.RoleSessionName + } + case authKeyUpbound: + if pc.Spec.Credentials.Upbound == nil || pc.Spec.Credentials.Upbound.WebIdentity == nil { + return errors.New(`spec.credentials.upbound.webIdentity of ProviderConfig cannot be nil when the credential source is "Upbound"`) + } + ps.Configuration[keyAssumeRoleWithWebIdentity] = map[string]any{ + keyRoleArn: aws.ToString(pc.Spec.Credentials.Upbound.WebIdentity.RoleARN), + keyWebIdentityTokenFile: upboundProviderIdentityTokenFile, + } + if pc.Spec.Credentials.Upbound.WebIdentity.RoleSessionName != "" { + ps.Configuration[keySessionName] = pc.Spec.Credentials.Upbound.WebIdentity.RoleSessionName + } + case authKeySecret: + data, err := resource.CommonCredentialExtractor(ctx, s, c, pc.Spec.Credentials.CommonCredentialSelectors) if err != nil { - return ps, errors.Wrap(err, errRegionNotFound) + return errors.Wrap(err, "cannot get credentials") + } + cfg, err = UseProviderSecret(ctx, data, DefaultSection, cfg.Region) + if err != nil { + return errors.Wrap(err, errAWSConfig) + } + creds, err := cfg.Credentials.Retrieve(ctx) + if err != nil { + return errors.Wrap(err, "failed to retrieve aws credentials from aws config") } - - // Set credentials in Terraform provider configuration. ps.Configuration = map[string]any{ - accessKeyID: creds[accessKeyID], - secretAccessKey: creds[secretAccessKey], - keyRegion: region, + keyRegion: cfg.Region, + keyAccessKeyID: creds.AccessKeyID, + keySecretAccessKey: creds.SecretAccessKey, + keySessionToken: creds.SessionToken, } - return ps, nil } + if len(pc.Spec.AssumeRoleChain) != 0 { + ps.Configuration[keyAssumeRole] = map[string]any{ + keyRoleArn: pc.Spec.AssumeRoleChain[0].RoleARN, + keyTags: pc.Spec.AssumeRoleChain[0].Tags, + keyTransitiveTagKeys: pc.Spec.AssumeRoleChain[0].TransitiveTagKeys, + keyExternalID: pc.Spec.AssumeRoleChain[0].ExternalID, + } + } + return nil +} + +func DefaultTerraformSetupBuilder(ctx context.Context, c client.Client, mg resource.Managed, pc *v1beta1.ProviderConfig, ps *terraform.Setup) error { + cfg, err := getAWSConfig(ctx, c, mg) + if err != nil { + return errors.Wrap(err, "cannot get AWS config") + } + creds, err := cfg.Credentials.Retrieve(ctx) + if err != nil { + return errors.Wrap(err, "failed to retrieve aws credentials from aws config") + } + + ps.Configuration = map[string]any{ + keyRegion: cfg.Region, + keyAccessKeyID: creds.AccessKeyID, + keySecretAccessKey: creds.SecretAccessKey, + keySessionToken: creds.SessionToken, + keySkipCredsValidation: pc.Spec.SkipCredsValidation, + keyS3UsePathStyle: pc.Spec.S3UsePathStyle, + keySkipRegionValidation: pc.Spec.SkipRegionValidation, + keySkipMetadataApiCheck: pc.Spec.SkipMetadataApiCheck, + keySkipReqAccountId: pc.Spec.SkipReqAccountId, + } + + if pc.Spec.Endpoint != nil { + if pc.Spec.Endpoint.URL.Static != nil { + if len(pc.Spec.Endpoint.Services) > 0 && *pc.Spec.Endpoint.URL.Static == "" { + return errors.Wrap(err, "endpoint is wrong") + } else { + endpoints := make(map[string]string) + for _, service := range pc.Spec.Endpoint.Services { + endpoints[service] = aws.ToString(pc.Spec.Endpoint.URL.Static) + } + ps.Configuration[keyEndpoints] = endpoints + } + } + } + return err +} + +func getAccountId(ctx context.Context, c client.Client, mg resource.Managed) (string, error) { + cfg, err := getAWSConfig(ctx, c, mg) + if err != nil { + return "", errors.Wrap(err, "cannot get AWS config") + } + creds, err := cfg.Credentials.Retrieve(ctx) + if err != nil { + return "", errors.Wrap(err, "failed to retrieve aws credentials from aws config") + } + identity, err := GlobalCallerIdentityCache.GetCallerIdentity(ctx, *cfg, creds) + if err != nil { + return "", errors.Wrap(err, "cannot get the caller identity") + } + return *identity.Account, nil } -func getRegion(obj runtime.Object) (string, error) { - fromMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) +func getAWSConfig(ctx context.Context, c client.Client, mg resource.Managed) (*aws.Config, error) { + cfg, err := GetAWSConfig(ctx, c, mg) if err != nil { - return "", errors.Wrap(err, "cannot convert to unstructured") + return nil, errors.Wrap(err, "cannot get AWS config") + } + if cfg.Region == "" && mg.GetObjectKind().GroupVersionKind().Group == "iam.aws.kubedb.com" { + cfg.Region = "us-east-1" + } + return cfg, nil +} + +func configureNoForkAWSClient(ctx context.Context, c client.Client, mg resource.Managed, pc *v1beta1.ProviderConfig, ps *terraform.Setup) (xpprovider.AWSConfig, error) { //nolint:gocyclo + if len(pc.Spec.AssumeRoleChain) > 1 || pc.Spec.Endpoint != nil { + return xpprovider.AWSConfig{}, errors.New("cannot configure no-fork client because the length of assume role chain array " + + "is more than 1 or endpoint configuration is not nil") + } + + cfg, err := getAWSConfig(ctx, c, mg) + if err != nil { + return xpprovider.AWSConfig{}, errors.Wrap(err, "cannot get AWS config") + } + + awsConfig := xpprovider.AWSConfig{ + Region: cfg.Region, + TerraformVersion: ps.Version, + } + + switch s := pc.Spec.Credentials.Source; s { //nolint:exhaustive + case authKeyWebIdentity: + if pc.Spec.Credentials.WebIdentity == nil { + return xpprovider.AWSConfig{}, errors.New(`spec.credentials.webIdentity of ProviderConfig cannot be nil when the credential source is "WebIdentity"`) + } + awsConfig.AssumeRoleWithWebIdentity = &tfawsbase.AssumeRoleWithWebIdentity{ + RoleARN: aws.ToString(pc.Spec.Credentials.WebIdentity.RoleARN), + WebIdentityTokenFile: os.Getenv(envWebIdentityTokenFile), + } + if pc.Spec.Credentials.WebIdentity.RoleSessionName != "" { + awsConfig.AssumeRoleWithWebIdentity.SessionName = pc.Spec.Credentials.WebIdentity.RoleSessionName + } + case authKeyUpbound: + if pc.Spec.Credentials.Upbound == nil || pc.Spec.Credentials.Upbound.WebIdentity == nil { + return xpprovider.AWSConfig{}, errors.New(`spec.credentials.upbound.webIdentity of ProviderConfig cannot be nil when the credential source is "Upbound"`) + } + awsConfig.AssumeRoleWithWebIdentity = &tfawsbase.AssumeRoleWithWebIdentity{ + RoleARN: aws.ToString(pc.Spec.Credentials.Upbound.WebIdentity.RoleARN), + WebIdentityTokenFile: upboundProviderIdentityTokenFile, + } + + if pc.Spec.Credentials.Upbound.WebIdentity.RoleSessionName != "" { + awsConfig.AssumeRoleWithWebIdentity.SessionName = pc.Spec.Credentials.WebIdentity.RoleSessionName + } + case authKeySecret: + data, err := resource.CommonCredentialExtractor(ctx, s, c, pc.Spec.Credentials.CommonCredentialSelectors) + if err != nil { + return xpprovider.AWSConfig{}, errors.Wrap(err, "cannot get credentials") + } + cfg, err = UseProviderSecret(ctx, data, DefaultSection, cfg.Region) + if err != nil { + return xpprovider.AWSConfig{}, errors.Wrap(err, errAWSConfig) + } + creds, err := cfg.Credentials.Retrieve(ctx) + if err != nil { + return xpprovider.AWSConfig{}, errors.Wrap(err, "failed to retrieve aws credentials from aws config") + } + + awsConfig.Region = cfg.Region + awsConfig.AccessKey = creds.AccessKeyID + awsConfig.SecretKey = creds.SecretAccessKey + awsConfig.Token = creds.SessionToken + } - r, err := fieldpath.Pave(fromMap).GetString("spec.forProvider.region") - if fieldpath.IsNotFound(err) { - // Region is not required for all resources, e.g. resource in "iam" - // group. - return "", nil + if len(pc.Spec.AssumeRoleChain) != 0 { + if pc.Spec.AssumeRoleChain[0].RoleARN == nil { + return xpprovider.AWSConfig{}, errors.New("cannot configure no-fork client: RoleARN cannot be nil in spec.AssumeRoleChain[0]") + } + awsConfig.AssumeRole = &tfawsbase.AssumeRole{ + RoleARN: *pc.Spec.AssumeRoleChain[0].RoleARN, + TransitiveTagKeys: pc.Spec.AssumeRoleChain[0].TransitiveTagKeys, + } + + if pc.Spec.AssumeRoleChain[0].ExternalID != nil { + awsConfig.AssumeRole.ExternalID = *pc.Spec.AssumeRoleChain[0].ExternalID + } + + tags := make(map[string]string) + for i, tag := range pc.Spec.AssumeRoleChain[0].Tags { + if tag.Key == nil || tag.Value == nil { + return xpprovider.AWSConfig{}, errors.Errorf("cannot configure no-fork client: tag key or value cannot be nil in spec.AssumeRoleChain[0].Tags[%d]", i) + } + tags[*tag.Key] = *tag.Value + } + + awsConfig.AssumeRole.Tags = tags } - return r, err + return awsConfig, nil } diff --git a/internal/clients/cache.go b/internal/clients/cache.go new file mode 100644 index 0000000..8ee275e --- /dev/null +++ b/internal/clients/cache.go @@ -0,0 +1,155 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +package clients + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/sts" + "github.com/pkg/errors" +) + +const ( + errGetCallerIdentityFailed = "GetCallerIdentity query failed" +) + +// GlobalCallerIdentityCache is a global cache to be used by all controllers. +var GlobalCallerIdentityCache = NewCallerIdentityCache() + +// CallerIdentityCacheOption lets you configure *CallerIdentityCache. +type CallerIdentityCacheOption func(*CallerIdentityCache) + +// GetCallerIdentityFn is the function type to call GetCallerIdentity API. +type GetCallerIdentityFn func(ctx context.Context, cfg aws.Config) (*sts.GetCallerIdentityOutput, error) + +// WithGetCallerIdentityFn lets you override the default GetCallerIdentityFn. +func WithGetCallerIdentityFn(f GetCallerIdentityFn) CallerIdentityCacheOption { + return func(c *CallerIdentityCache) { + c.getCallerIdentityFn = f + } +} + +// WithMaxSize lets you override the default MaxSize. +func WithMaxSize(n int) CallerIdentityCacheOption { + return func(c *CallerIdentityCache) { + c.maxSize = n + } +} + +// WithCache lets you bootstrap with your own cache. +func WithCache(cache map[string]*callerIdentityCacheEntry) CallerIdentityCacheOption { + return func(c *CallerIdentityCache) { + c.cache = cache + } +} + +// NewCallerIdentityCache returns a new empty *CallerIdentityCache. +func NewCallerIdentityCache(opts ...CallerIdentityCacheOption) *CallerIdentityCache { + c := &CallerIdentityCache{ + cache: map[string]*callerIdentityCacheEntry{}, + maxSize: 100, + getCallerIdentityFn: AWSGetCallerIdentity, + mu: &sync.RWMutex{}, + } + for _, f := range opts { + f(c) + } + return c +} + +// CallerIdentityCache holds GetCallerIdentityOutput objects in memory so that +// we don't need to make API calls to AWS in every reconciliation of every +// resource. It has a maximum size that when it's reached, the entry that has +// the oldest access time will be removed from the cache, i.e. FIFO on last access +// time. +// Note that there is no need to invalidate the values in the cache because they +// never change so we don't need concurrency-safety to prevent access to an +// invalidated entry. +type CallerIdentityCache struct { + // cache holds caller identity with a key whose format is the following: + // :: + // Any of the variables could be empty. + cache map[string]*callerIdentityCacheEntry + + // maxSize is the maximum number of elements this cache can ever have. + maxSize int + + // newClientFn returns a client that we can call GetCallerIdentity function + /// of. You need to override the default only in the tests. + getCallerIdentityFn GetCallerIdentityFn + + // mu is used to make sure the cache map is concurrency-safe. + mu *sync.RWMutex +} + +type callerIdentityCacheEntry struct { + *sts.GetCallerIdentityOutput + AccessedAt time.Time +} + +// GetCallerIdentity returns the identity of the caller. +func (c *CallerIdentityCache) GetCallerIdentity(ctx context.Context, cfg aws.Config, creds aws.Credentials) (*sts.GetCallerIdentityOutput, error) { + key := fmt.Sprintf("%s:%s:%s", + creds.AccessKeyID, + creds.SecretAccessKey, + creds.SessionToken, + ) + c.mu.RLock() + o, ok := c.cache[key] + c.mu.RUnlock() + if ok { + // Because this is in the hot path of the execution, i.e. all CRs get + // here in every reconciliation, we don't want to block with a lock + // unless it's really necessary. Even an unnecessary cache invalidation + // is fine since the cost is one additional API call. + if time.Since(o.AccessedAt) > 10*time.Minute { + c.mu.Lock() + o.AccessedAt = time.Now() + c.mu.Unlock() + } + return o.GetCallerIdentityOutput, nil + } + i, err := c.getCallerIdentityFn(ctx, cfg) + if err != nil { + return nil, errors.Wrap(err, errGetCallerIdentityFailed) + } + c.mu.Lock() + defer c.mu.Unlock() + c.makeRoom() + c.cache[key] = &callerIdentityCacheEntry{ + AccessedAt: time.Now(), + GetCallerIdentityOutput: i, + } + return i, nil +} + +// makeRoom ensures that there is at most maxSize-1 elements in the cache map +// so that a new entry can be added. It deletes the object that was last accessed +// before all others. +func (c *CallerIdentityCache) makeRoom() { + if 1+len(c.cache) <= c.maxSize { + return + } + var dustiest string + for key, val := range c.cache { + if dustiest == "" { + dustiest = key + } + if val.AccessedAt.Before(c.cache[dustiest].AccessedAt) { + dustiest = key + } + } + delete(c.cache, dustiest) +} + +// AWSGetCallerIdentity makes sends a request to AWS to get the caller identity. +func AWSGetCallerIdentity(ctx context.Context, cfg aws.Config) (*sts.GetCallerIdentityOutput, error) { + i, err := sts.NewFromConfig(cfg).GetCallerIdentity(ctx, &sts.GetCallerIdentityInput{}) //nolint:contextcheck + return i, errors.Wrap(err, errGetCallerIdentityFailed) +} diff --git a/internal/clients/provider_config.go b/internal/clients/provider_config.go new file mode 100644 index 0000000..3caf640 --- /dev/null +++ b/internal/clients/provider_config.go @@ -0,0 +1,405 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +package clients + +import ( + "context" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/credentials" + "github.com/aws/aws-sdk-go-v2/credentials/stscreds" + "github.com/aws/aws-sdk-go-v2/service/sts" + stscredstypesv2 "github.com/aws/aws-sdk-go-v2/service/sts/types" + "github.com/aws/smithy-go/middleware" + "github.com/go-ini/ini" + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/crossplane/crossplane-runtime/pkg/fieldpath" + "github.com/crossplane/crossplane-runtime/pkg/resource" + + "kubedb.dev/provider-aws/apis/v1beta1" + "kubedb.dev/provider-aws/internal/version" +) + +const ( + // DefaultSection for INI files. + //DefaultSection = ini.DefaultSection + DefaultSection = "DEFAULT" + + // authentication types + authKeyIRSA = "IRSA" + authKeyWebIdentity = "WebIdentity" + authKeyUpbound = "Upbound" + // authKeySAML = "SAML" + authKeySecret = "Secret" + + envWebIdentityTokenFile = "AWS_WEB_IDENTITY_TOKEN_FILE" + errRoleChainConfig = "failed to load assumed role AWS config" + errAWSConfig = "failed to get AWS config" + errAWSConfigIRSA = "failed to get AWS config using IAM Roles for Service Accounts" + errAWSConfigWebIdentity = "failed to get AWS config using web identity token" + errAWSConfigUpbound = "failed to get AWS config using Upbound identity" + + upboundProviderIdentityTokenFile = "/var/run/secrets/kubedb.com/provider/token" +) + +// GlobalRegion is the region name used for AWS services that do not have a notion +// of region. +const GlobalRegion = "aws-global" + +// Endpoint URL configuration types. +const ( + URLConfigTypeStatic = "Static" + URLConfigTypeDynamic = "Dynamic" +) + +// userAgentV2 constructs the Crossplane user agent for AWS v2 clients +var userAgentV2 = config.WithAPIOptions([]func(*middleware.Stack) error{ + awsmiddleware.AddUserAgentKeyValue("upbound-provider-aws", version.Version), + awsmiddleware.AddUserAgentKeyValue("crossplane-provider-aws", version.Version), +}) + +func getRegion(obj runtime.Object) (string, error) { + fromMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) + if err != nil { + return "", errors.Wrap(err, "cannot convert to unstructured") + } + r, err := fieldpath.Pave(fromMap).GetString("spec.forProvider.region") + if fieldpath.IsNotFound(err) { + // Region is not required for all resources, e.g. resource in "iam" + // group. + return "", nil + } + return r, err +} + +// GetAWSConfig to produce a config that can be used to authenticate to AWS. +func GetAWSConfig(ctx context.Context, c client.Client, mg resource.Managed) (*aws.Config, error) { // nolint:gocyclo + if mg.GetProviderConfigReference() == nil { + return nil, errors.New("no providerConfigRef provided") + } + region, err := getRegion(mg) + if err != nil { + return nil, errors.Wrap(err, "cannot get region") + } + pc := &v1beta1.ProviderConfig{} + if err := c.Get(ctx, types.NamespacedName{Name: mg.GetProviderConfigReference().Name}, pc); err != nil { + return nil, errors.Wrap(err, "cannot get referenced Provider") + } + + t := resource.NewProviderConfigUsageTracker(c, &v1beta1.ProviderConfigUsage{}) + if err := t.Track(ctx, mg); err != nil { + return nil, errors.Wrap(err, "cannot track ProviderConfig usage") + } + + var cfg *aws.Config + switch s := pc.Spec.Credentials.Source; s { //nolint:exhaustive + case authKeyIRSA: + cfg, err = UseDefault(ctx, region) + if err != nil { + return nil, errors.Wrap(err, errAWSConfigIRSA) + } + case authKeyWebIdentity: + cfg, err = UseWebIdentityToken(ctx, region, &pc.Spec) + if err != nil { + return nil, errors.Wrap(err, errAWSConfigWebIdentity) + } + case authKeyUpbound: + cfg, err = UseUpbound(ctx, region, &pc.Spec) + if err != nil { + return nil, errors.Wrap(err, errAWSConfigUpbound) + } + default: + data, err := resource.CommonCredentialExtractor(ctx, s, c, pc.Spec.Credentials.CommonCredentialSelectors) + if err != nil { + return nil, errors.Wrap(err, "cannot get credentials") + } + cfg, err = UseProviderSecret(ctx, data, DefaultSection, region) + if err != nil { + return nil, errors.Wrap(err, errAWSConfig) + } + } + + cfg, err = GetRoleChainConfig(ctx, &pc.Spec, cfg) + if err != nil { + return nil, errors.Wrap(err, "cannot get credentials") + } + return SetResolver(pc, cfg), nil +} + +type awsEndpointResolverAdaptorWithOptions func(service, region string, options interface{}) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptorWithOptions) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region, options) +} + +// SetResolver parses annotations from the managed resource +// and returns a configuration accordingly. +func SetResolver(pc *v1beta1.ProviderConfig, cfg *aws.Config) *aws.Config { // nolint:gocyclo + if pc.Spec.Endpoint == nil { + return cfg + } + cfg.EndpointResolverWithOptions = awsEndpointResolverAdaptorWithOptions(func(service, region string, options interface{}) (aws.Endpoint, error) { //nolint:staticcheck + fullURL := "" + switch pc.Spec.Endpoint.URL.Type { + case URLConfigTypeStatic: + if pc.Spec.Endpoint.URL.Static == nil { + return aws.Endpoint{}, errors.New("static type is chosen but static field does not have a value") + } + fullURL = aws.ToString(pc.Spec.Endpoint.URL.Static) + case URLConfigTypeDynamic: + if pc.Spec.Endpoint.URL.Dynamic == nil { + return aws.Endpoint{}, errors.New("dynamic type is chosen but dynamic configuration is not given") + } + // NOTE(muvaf): IAM does not have any region. + if service == "IAM" { + fullURL = fmt.Sprintf("%s://%s.%s", pc.Spec.Endpoint.URL.Dynamic.Protocol, strings.ToLower(service), pc.Spec.Endpoint.URL.Dynamic.Host) + } else { + fullURL = fmt.Sprintf("%s://%s.%s.%s", pc.Spec.Endpoint.URL.Dynamic.Protocol, strings.ToLower(service), region, pc.Spec.Endpoint.URL.Dynamic.Host) + } + default: + return aws.Endpoint{}, errors.New("unsupported url config type is chosen") + } + e := aws.Endpoint{ + URL: fullURL, + HostnameImmutable: aws.ToBool(pc.Spec.Endpoint.HostnameImmutable), + PartitionID: aws.ToString(pc.Spec.Endpoint.PartitionID), + SigningName: aws.ToString(pc.Spec.Endpoint.SigningName), + SigningRegion: aws.ToString(LateInitializeStringPtr(pc.Spec.Endpoint.SigningRegion, ®ion)), + SigningMethod: aws.ToString(pc.Spec.Endpoint.SigningMethod), + } + // Only IAM does not have a region parameter and "aws-global" is used in + // SDK setup. However, signing region has to be us-east-1 and it needs + // to be set. + if region == "aws-global" { + switch aws.ToString(pc.Spec.Endpoint.PartitionID) { + case "aws-us-gov", "aws-cn", "aws-iso", "aws-iso-b": + e.SigningRegion = aws.ToString(LateInitializeStringPtr(pc.Spec.Endpoint.SigningRegion, ®ion)) + default: + e.SigningRegion = "us-east-1" + } + } + if pc.Spec.Endpoint.Source != nil { + switch *pc.Spec.Endpoint.Source { + case "ServiceMetadata": + e.Source = aws.EndpointSourceServiceMetadata + case "Custom": + e.Source = aws.EndpointSourceCustom + } + } + return e, nil + }) + return cfg +} + +// CredentialsIDSecret retrieves AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the data which contains +// aws credentials under given profile +// Example: +// [default] +// aws_access_key_id = +// aws_secret_access_key = +func CredentialsIDSecret(data []byte, profile string) (aws.Credentials, error) { + awsConfig, err := ini.InsensitiveLoad(data) + if err != nil { + return aws.Credentials{}, errors.Wrap(err, "cannot parse credentials secret") + } + + iniProfile, err := awsConfig.GetSection(profile) + if err != nil { + return aws.Credentials{}, errors.Wrap(err, fmt.Sprintf("cannot get %s profile in credentials secret", profile)) + } + + accessKeyID := iniProfile.Key("aws_access_key_id") + secretAccessKey := iniProfile.Key("aws_secret_access_key") + sessionToken := iniProfile.Key("aws_session_token") + + // NOTE(muvaf): Key function implementation never returns nil but still its + // type is pointer so we check to make sure its next versions doesn't break + // that implicit contract. + if accessKeyID == nil || secretAccessKey == nil || sessionToken == nil { + return aws.Credentials{}, errors.New("returned key can be empty but cannot be nil") + } + + return aws.Credentials{ + AccessKeyID: accessKeyID.Value(), + SecretAccessKey: secretAccessKey.Value(), + SessionToken: sessionToken.Value(), + }, nil +} + +// AuthMethod is a method of authenticating to the AWS API +type AuthMethod func(context.Context, []byte, string, string) (*aws.Config, error) + +// stsRegionOrDefault sets the STS client region to the passed region, or +// defaults to the global region. +func stsRegionOrDefault(region string) func(*sts.Options) { + return func(o *sts.Options) { + if region == "" { + o.Region = GlobalRegion + } + } +} + +// UseProviderSecret - AWS configuration which can be used to issue requests against AWS API +func UseProviderSecret(ctx context.Context, data []byte, profile, region string) (*aws.Config, error) { + creds, err := CredentialsIDSecret(data, profile) + if err != nil { + return nil, errors.Wrap(err, "cannot parse credentials secret") + } + + awsConfig, err := config.LoadDefaultConfig( + ctx, + userAgentV2, + config.WithRegion(region), + config.WithCredentialsProvider(credentials.StaticCredentialsProvider{ + Value: creds, + }), + ) + if err != nil { + return nil, errors.Wrap(err, "cannot load default AWS config") + } + return &awsConfig, nil +} + +// GetRoleChainConfig returns an aws.Config capable of doing role chaining with +// AssumeRoleWithWebIdentity & AssumeRoles. +func GetRoleChainConfig(ctx context.Context, pcs *v1beta1.ProviderConfigSpec, cfg *aws.Config) (*aws.Config, error) { + pCfg := cfg + for _, aro := range pcs.AssumeRoleChain { + stsAssume := stscreds.NewAssumeRoleProvider( + sts.NewFromConfig(*pCfg, stsRegionOrDefault(cfg.Region)), //nolint:contextcheck + aws.ToString(aro.RoleARN), + SetAssumeRoleOptions(aro), + ) + cfgWithAssumeRole, err := config.LoadDefaultConfig( + ctx, + userAgentV2, + config.WithRegion(cfg.Region), + config.WithCredentialsProvider(aws.NewCredentialsCache(stsAssume)), + ) + if err != nil { + return nil, errors.Wrap(err, errRoleChainConfig) + } + pCfg = &cfgWithAssumeRole + } + return pCfg, nil +} + +// GetAssumeRoleWithWebIdentityConfig returns an aws.Config capable of doing +// AssumeRoleWithWebIdentity. +func GetAssumeRoleWithWebIdentityConfig(ctx context.Context, cfg *aws.Config, webID v1beta1.AssumeRoleWithWebIdentityOptions, tokenFile string) (*aws.Config, error) { + stsclient := sts.NewFromConfig(*cfg, stsRegionOrDefault(cfg.Region)) //nolint:contextcheck + awsConfig, err := config.LoadDefaultConfig( + ctx, + userAgentV2, + config.WithRegion(cfg.Region), + config.WithCredentialsProvider(aws.NewCredentialsCache( + stscreds.NewWebIdentityRoleProvider( + stsclient, + aws.ToString(webID.RoleARN), + stscreds.IdentityTokenFile(filepath.Clean(tokenFile)), + SetWebIdentityRoleOptions(webID), + )), + ), + ) + if err != nil { + return nil, errors.Wrap(err, "failed to load assumed role with web identity AWS config") + } + return &awsConfig, nil +} + +// UseDefault loads the default AWS config with the specified region. +func UseDefault(ctx context.Context, region string) (*aws.Config, error) { + if region == GlobalRegion { + cfg, err := config.LoadDefaultConfig( + ctx, + userAgentV2, + ) + return &cfg, errors.Wrap(err, "failed to load default AWS config") + } + cfg, err := config.LoadDefaultConfig( + ctx, + userAgentV2, + config.WithRegion(region), + ) + if err != nil { + return nil, errors.Wrap(err, fmt.Sprintf("failed to load default AWS config with region %s", region)) + } + return &cfg, nil +} + +// UseWebIdentityToken calls sts.AssumeRoleWithWebIdentity using +// the configuration supplied in ProviderConfig's +// spec.credentials.assumeRoleWithWebIdentity. +func UseWebIdentityToken(ctx context.Context, region string, pcs *v1beta1.ProviderConfigSpec) (*aws.Config, error) { + cfg, err := UseDefault(ctx, region) + if err != nil { + return nil, errors.Wrap(err, "failed to get default AWS config") + } + if pcs.Credentials.WebIdentity == nil { + return nil, errors.New(`spec.credentials.webIdentity of ProviderConfig cannot be nil when the credential source is "WebIdentity"`) + } + return GetAssumeRoleWithWebIdentityConfig(ctx, cfg, *pcs.Credentials.WebIdentity, os.Getenv(envWebIdentityTokenFile)) +} + +// UseUpbound calls sts.AssumeRoleWithWebIdentity using the configuration +// supplied in ProviderConfig's spec.credentials.assumeRoleWithWebIdentity and +// the identity supplied by the injected Upbound OIDC token. +// NOTE(hasheddan): this is the same functionality used for generic web identity +// token role assumption, but uses fields under Upbound in the ProviderConfig +// spec and the dedicated Upbound token injection path. This allows for clear +// separation of intent by users when exercising the functionality, and allows +// for uniformity across ProviderConfigs from other providers. +func UseUpbound(ctx context.Context, region string, pcs *v1beta1.ProviderConfigSpec) (*aws.Config, error) { + cfg, err := UseDefault(ctx, region) + if err != nil { + return nil, errors.Wrap(err, "failed to get default AWS config ") + } + if pcs.Credentials.Upbound == nil || pcs.Credentials.Upbound.WebIdentity == nil { + return nil, errors.New(`spec.credentials.upbound.webIdentity of ProviderConfig cannot be nil when the credential source is "Upbound"`) + } + return GetAssumeRoleWithWebIdentityConfig(ctx, cfg, *pcs.Credentials.Upbound.WebIdentity, upboundProviderIdentityTokenFile) +} + +// SetAssumeRoleOptions sets options when Assuming an IAM Role +func SetAssumeRoleOptions(aro v1beta1.AssumeRoleOptions) func(*stscreds.AssumeRoleOptions) { + return func(opt *stscreds.AssumeRoleOptions) { + opt.ExternalID = aro.ExternalID + for _, t := range aro.Tags { + opt.Tags = append( + opt.Tags, + stscredstypesv2.Tag{ + Key: t.Key, + Value: t.Value, + }) + } + opt.TransitiveTagKeys = append(opt.TransitiveTagKeys, aro.TransitiveTagKeys...) + } +} + +// SetWebIdentityRoleOptions sets options when exchanging a WebIdentity Token for a Role +func SetWebIdentityRoleOptions(opts v1beta1.AssumeRoleWithWebIdentityOptions) func(*stscreds.WebIdentityRoleOptions) { + return func(opt *stscreds.WebIdentityRoleOptions) { + opt.RoleSessionName = opts.RoleSessionName + } +} + +// LateInitializeStringPtr returns in if it's non-nil, otherwise returns from +// which is the backup for the cases in is nil. +func LateInitializeStringPtr(in *string, from *string) *string { + if in != nil { + return in + } + return from +} diff --git a/internal/controller/docdb/cluster/zz_controller.go b/internal/controller/docdb/cluster/zz_controller.go index a46adcd..95c062d 100755 --- a/internal/controller/docdb/cluster/zz_controller.go +++ b/internal/controller/docdb/cluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Cluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Cluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Cluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Cluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/clusterinstance/zz_controller.go b/internal/controller/docdb/clusterinstance/zz_controller.go index 88fde01..5e994f5 100755 --- a/internal/controller/docdb/clusterinstance/zz_controller.go +++ b/internal/controller/docdb/clusterinstance/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterInstance_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_instance"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_instance"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterInstance_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterInstance{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterInstance{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/clusterparametergroup/zz_controller.go b/internal/controller/docdb/clusterparametergroup/zz_controller.go index 92fc9e1..c73ce63 100755 --- a/internal/controller/docdb/clusterparametergroup/zz_controller.go +++ b/internal/controller/docdb/clusterparametergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterParameterGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_parameter_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_parameter_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterParameterGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterParameterGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterParameterGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/clustersnapshot/zz_controller.go b/internal/controller/docdb/clustersnapshot/zz_controller.go index 922fd31..7805f8c 100755 --- a/internal/controller/docdb/clustersnapshot/zz_controller.go +++ b/internal/controller/docdb/clustersnapshot/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterSnapshot_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_snapshot"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_cluster_snapshot"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterSnapshot_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterSnapshot{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterSnapshot{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/eventsubscription/zz_controller.go b/internal/controller/docdb/eventsubscription/zz_controller.go index 6b5ef79..87ea329 100755 --- a/internal/controller/docdb/eventsubscription/zz_controller.go +++ b/internal/controller/docdb/eventsubscription/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.EventSubscription_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_event_subscription"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_event_subscription"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.EventSubscription_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.EventSubscription{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.EventSubscription{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/globalcluster/zz_controller.go b/internal/controller/docdb/globalcluster/zz_controller.go index bcd0f7c..473aba1 100755 --- a/internal/controller/docdb/globalcluster/zz_controller.go +++ b/internal/controller/docdb/globalcluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalCluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_global_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_global_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.GlobalCluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.GlobalCluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalCluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/docdb/subnetgroup/zz_controller.go b/internal/controller/docdb/subnetgroup/zz_controller.go index 20b6b4f..033fbf4 100755 --- a/internal/controller/docdb/subnetgroup/zz_controller.go +++ b/internal/controller/docdb/subnetgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/docdb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SubnetGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_docdb_subnet_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_docdb_subnet_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SubnetGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.SubnetGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SubnetGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/contributorinsights/zz_controller.go b/internal/controller/dynamodb/contributorinsights/zz_controller.go index cc74d91..f67e8c4 100755 --- a/internal/controller/dynamodb/contributorinsights/zz_controller.go +++ b/internal/controller/dynamodb/contributorinsights/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ContributorInsights_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ContributorInsights_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_contributor_insights"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ContributorInsights_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_contributor_insights"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ContributorInsights_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ContributorInsights_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ContributorInsights{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ContributorInsights{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/globaltable/zz_controller.go b/internal/controller/dynamodb/globaltable/zz_controller.go index a4ca77e..3c32365 100755 --- a/internal/controller/dynamodb/globaltable/zz_controller.go +++ b/internal/controller/dynamodb/globaltable/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalTable_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalTable_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_global_table"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalTable_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_global_table"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.GlobalTable_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalTable_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.GlobalTable{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalTable{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/kinesisstreamingdestination/zz_controller.go b/internal/controller/dynamodb/kinesisstreamingdestination/zz_controller.go index a0e35a2..7b5da2b 100755 --- a/internal/controller/dynamodb/kinesisstreamingdestination/zz_controller.go +++ b/internal/controller/dynamodb/kinesisstreamingdestination/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.KinesisStreamingDestination_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.KinesisStreamingDestination_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_kinesis_streaming_destination"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.KinesisStreamingDestination_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_kinesis_streaming_destination"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.KinesisStreamingDestination_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.KinesisStreamingDestination_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.KinesisStreamingDestination{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.KinesisStreamingDestination{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/table/zz_controller.go b/internal/controller/dynamodb/table/zz_controller.go index 4d90bc3..1c45c73 100755 --- a/internal/controller/dynamodb/table/zz_controller.go +++ b/internal/controller/dynamodb/table/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Table_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Table_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Table_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Table_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Table_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Table{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Table{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/tableitem/zz_controller.go b/internal/controller/dynamodb/tableitem/zz_controller.go index fcb42b5..13ca7b2 100755 --- a/internal/controller/dynamodb/tableitem/zz_controller.go +++ b/internal/controller/dynamodb/tableitem/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.TableItem_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TableItem_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table_item"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TableItem_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table_item"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.TableItem_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.TableItem_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.TableItem{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.TableItem{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/tablereplica/zz_controller.go b/internal/controller/dynamodb/tablereplica/zz_controller.go index aa506b2..2305592 100755 --- a/internal/controller/dynamodb/tablereplica/zz_controller.go +++ b/internal/controller/dynamodb/tablereplica/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.TableReplica_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TableReplica_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table_replica"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TableReplica_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_table_replica"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.TableReplica_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.TableReplica_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.TableReplica{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.TableReplica{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/dynamodb/tag/zz_controller.go b/internal/controller/dynamodb/tag/zz_controller.go index b15ea13..293cf7e 100755 --- a/internal/controller/dynamodb/tag/zz_controller.go +++ b/internal/controller/dynamodb/tag/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/dynamodb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Tag_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_tag"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_dynamodb_tag"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Tag_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Tag{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Tag{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/route/zz_controller.go b/internal/controller/ec2/route/zz_controller.go index 5975b3b..455de43 100755 --- a/internal/controller/ec2/route/zz_controller.go +++ b/internal/controller/ec2/route/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Route_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Route_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Route_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_route"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Route_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Route_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Route{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Route{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/securitygroup/zz_controller.go b/internal/controller/ec2/securitygroup/zz_controller.go new file mode 100755 index 0000000..affbb7a --- /dev/null +++ b/internal/controller/ec2/securitygroup/zz_controller.go @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package securitygroup + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles SecurityGroup managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.SecurityGroup_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SecurityGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SecurityGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_security_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SecurityGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SecurityGroup_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SecurityGroup{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/ec2/securitygrouprule/zz_controller.go b/internal/controller/ec2/securitygrouprule/zz_controller.go index c590fad..309987d 100755 --- a/internal/controller/ec2/securitygrouprule/zz_controller.go +++ b/internal/controller/ec2/securitygrouprule/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SecurityGroupRule_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SecurityGroupRule_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_security_group_rule"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SecurityGroupRule_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_security_group_rule"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SecurityGroupRule_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SecurityGroupRule_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.SecurityGroupRule{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SecurityGroupRule{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/subnet/zz_controller.go b/internal/controller/ec2/subnet/zz_controller.go new file mode 100755 index 0000000..bcfddea --- /dev/null +++ b/internal/controller/ec2/subnet/zz_controller.go @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package subnet + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles Subnet managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Subnet_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Subnet_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Subnet_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_subnet"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Subnet_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Subnet_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Subnet{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/ec2/vpc/zz_controller.go b/internal/controller/ec2/vpc/zz_controller.go new file mode 100755 index 0000000..bcaef87 --- /dev/null +++ b/internal/controller/ec2/vpc/zz_controller.go @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package vpc + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles VPC managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VPC_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VPC_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VPC_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_vpc"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.VPC_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VPC_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VPC{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/ec2/vpcendpoint/zz_controller.go b/internal/controller/ec2/vpcendpoint/zz_controller.go new file mode 100755 index 0000000..d959b3b --- /dev/null +++ b/internal/controller/ec2/vpcendpoint/zz_controller.go @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package vpcendpoint + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles VPCEndpoint managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VPCEndpoint_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VPCEndpoint_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VPCEndpoint_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_vpc_endpoint"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.VPCEndpoint_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VPCEndpoint_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VPCEndpoint{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/ec2/vpcpeeringconnection/zz_controller.go b/internal/controller/ec2/vpcpeeringconnection/zz_controller.go index c8f5940..b5baad8 100755 --- a/internal/controller/ec2/vpcpeeringconnection/zz_controller.go +++ b/internal/controller/ec2/vpcpeeringconnection/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/ec2/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VPCPeeringConnection_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VPCPeeringConnection_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_vpc_peering_connection"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VPCPeeringConnection_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_vpc_peering_connection"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.VPCPeeringConnection_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VPCPeeringConnection_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.VPCPeeringConnection{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VPCPeeringConnection{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/cluster/zz_controller.go b/internal/controller/elasticache/cluster/zz_controller.go index 4866033..7347e1c 100755 --- a/internal/controller/elasticache/cluster/zz_controller.go +++ b/internal/controller/elasticache/cluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Cluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Cluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Cluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Cluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/parametergroup/zz_controller.go b/internal/controller/elasticache/parametergroup/zz_controller.go index 617ad80..12a2aeb 100755 --- a/internal/controller/elasticache/parametergroup/zz_controller.go +++ b/internal/controller/elasticache/parametergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ParameterGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_parameter_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_parameter_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ParameterGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ParameterGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ParameterGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/replicationgroup/zz_controller.go b/internal/controller/elasticache/replicationgroup/zz_controller.go index 921fd37..d72bcd2 100755 --- a/internal/controller/elasticache/replicationgroup/zz_controller.go +++ b/internal/controller/elasticache/replicationgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ReplicationGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ReplicationGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_replication_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ReplicationGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_replication_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ReplicationGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ReplicationGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ReplicationGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ReplicationGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/subnetgroup/zz_controller.go b/internal/controller/elasticache/subnetgroup/zz_controller.go index 5bd7739..1b1b75a 100755 --- a/internal/controller/elasticache/subnetgroup/zz_controller.go +++ b/internal/controller/elasticache/subnetgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SubnetGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_subnet_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_subnet_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SubnetGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.SubnetGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SubnetGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/user/zz_controller.go b/internal/controller/elasticache/user/zz_controller.go index c758c2f..727e27b 100755 --- a/internal/controller/elasticache/user/zz_controller.go +++ b/internal/controller/elasticache/user/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.User_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.User_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.User{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.User{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/usergroup/zz_controller.go b/internal/controller/elasticache/usergroup/zz_controller.go index 42c3dca..8529781 100755 --- a/internal/controller/elasticache/usergroup/zz_controller.go +++ b/internal/controller/elasticache/usergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticache/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.UserGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.UserGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.UserGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.UserGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.UserGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.UserGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.UserGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticsearch/domain/zz_controller.go b/internal/controller/elasticsearch/domain/zz_controller.go index cd91141..f834de0 100755 --- a/internal/controller/elasticsearch/domain/zz_controller.go +++ b/internal/controller/elasticsearch/domain/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticsearch/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Domain_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Domain_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Domain_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Domain_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Domain_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Domain{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Domain{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticsearch/domainpolicy/zz_controller.go b/internal/controller/elasticsearch/domainpolicy/zz_controller.go index 11a32c4..6e3e3ec 100755 --- a/internal/controller/elasticsearch/domainpolicy/zz_controller.go +++ b/internal/controller/elasticsearch/domainpolicy/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticsearch/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DomainPolicy_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DomainPolicy_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain_policy"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DomainPolicy_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain_policy"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.DomainPolicy_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DomainPolicy_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DomainPolicy{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DomainPolicy{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticsearch/domainsamloptions/zz_controller.go b/internal/controller/elasticsearch/domainsamloptions/zz_controller.go index 1f54056..393ef4d 100755 --- a/internal/controller/elasticsearch/domainsamloptions/zz_controller.go +++ b/internal/controller/elasticsearch/domainsamloptions/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/elasticsearch/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DomainSAMLOptions_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DomainSAMLOptions_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain_saml_options"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DomainSAMLOptions_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_elasticsearch_domain_saml_options"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.DomainSAMLOptions_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DomainSAMLOptions_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DomainSAMLOptions{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DomainSAMLOptions{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/role/zz_controller.go b/internal/controller/iam/role/zz_controller.go new file mode 100755 index 0000000..0c35ca8 --- /dev/null +++ b/internal/controller/iam/role/zz_controller.go @@ -0,0 +1,71 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package role + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/iam/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles Role managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Role_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Role_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Role_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_iam_role"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Role_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Role_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Role{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/kafka/cluster/zz_controller.go b/internal/controller/kafka/cluster/zz_controller.go index 53d0aa5..0a6cf0e 100755 --- a/internal/controller/kafka/cluster/zz_controller.go +++ b/internal/controller/kafka/cluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/kafka/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Cluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_msk_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_msk_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Cluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Cluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Cluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/kafka/configuration/zz_controller.go b/internal/controller/kafka/configuration/zz_controller.go index f70719e..8c8c457 100755 --- a/internal/controller/kafka/configuration/zz_controller.go +++ b/internal/controller/kafka/configuration/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/kafka/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Configuration_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Configuration_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_msk_configuration"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Configuration_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_msk_configuration"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Configuration_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Configuration_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Configuration{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Configuration{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/kinesis/stream/zz_controller.go b/internal/controller/kinesis/stream/zz_controller.go index ebaa4cf..54e7e23 100755 --- a/internal/controller/kinesis/stream/zz_controller.go +++ b/internal/controller/kinesis/stream/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/kinesis/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Stream_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Stream_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_kinesis_stream"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Stream_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_kinesis_stream"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Stream_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Stream_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Stream{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Stream{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/kms/key/zz_controller.go b/internal/controller/kms/key/zz_controller.go index fd95a55..1d25b1f 100755 --- a/internal/controller/kms/key/zz_controller.go +++ b/internal/controller/kms/key/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/kms/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Key_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Key_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_kms_key"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Key_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_kms_key"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Key_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Key_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Key{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Key{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/memorydb/acl/zz_controller.go b/internal/controller/memorydb/acl/zz_controller.go index 9488065..90e7537 100755 --- a/internal/controller/memorydb/acl/zz_controller.go +++ b/internal/controller/memorydb/acl/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ACL_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ACL_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_memorydb_acl"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ACL_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_memorydb_acl"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ACL_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ACL_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ACL{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ACL{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/memorydb/cluster/zz_controller.go b/internal/controller/memorydb/cluster/zz_controller.go index 6bb89aa..54d7677 100755 --- a/internal/controller/memorydb/cluster/zz_controller.go +++ b/internal/controller/memorydb/cluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Cluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_memorydb_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_memorydb_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Cluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Cluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Cluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/memorydb/parametergroup/zz_controller.go b/internal/controller/memorydb/parametergroup/zz_controller.go index dc01d5f..ceb346c 100755 --- a/internal/controller/memorydb/parametergroup/zz_controller.go +++ b/internal/controller/memorydb/parametergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ParameterGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_memorydb_parameter_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_memorydb_parameter_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ParameterGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ParameterGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ParameterGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/memorydb/snapshot/zz_controller.go b/internal/controller/memorydb/snapshot/zz_controller.go index 0b77377..1ea8aad 100755 --- a/internal/controller/memorydb/snapshot/zz_controller.go +++ b/internal/controller/memorydb/snapshot/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Snapshot_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_memorydb_snapshot"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_memorydb_snapshot"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Snapshot_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Snapshot{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Snapshot{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/memorydb/subnetgroup/zz_controller.go b/internal/controller/memorydb/subnetgroup/zz_controller.go index d3a705a..9de8123 100755 --- a/internal/controller/memorydb/subnetgroup/zz_controller.go +++ b/internal/controller/memorydb/subnetgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/memorydb/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SubnetGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_memorydb_subnet_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_memorydb_subnet_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SubnetGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.SubnetGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SubnetGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/providerconfig/config.go b/internal/controller/providerconfig/config.go index 1174daa..4d48e53 100644 --- a/internal/controller/providerconfig/config.go +++ b/internal/controller/providerconfig/config.go @@ -5,13 +5,11 @@ Copyright 2021 Upbound Inc. package providerconfig import ( - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/source" - "github.com/crossplane/crossplane-runtime/pkg/event" "github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig" "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" + ctrl "sigs.k8s.io/controller-runtime" "kubedb.dev/provider-aws/apis/v1beta1" ) @@ -30,7 +28,7 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { Named(name). WithOptions(o.ForControllerRuntime()). For(&v1beta1.ProviderConfig{}). - Watches(&source.Kind{Type: &v1beta1.ProviderConfigUsage{}}, &resource.EnqueueRequestForProviderConfig{}). + Watches(&v1beta1.ProviderConfigUsage{}, &resource.EnqueueRequestForProviderConfig{}). Complete(providerconfig.NewReconciler(mgr, of, providerconfig.WithLogger(o.Logger.WithValues("controller", name)), providerconfig.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))) diff --git a/internal/controller/rds/cluster/zz_controller.go b/internal/controller/rds/cluster/zz_controller.go index 87dbe88..14718c6 100755 --- a/internal/controller/rds/cluster/zz_controller.go +++ b/internal/controller/rds/cluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Cluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Cluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Cluster_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Cluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Cluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clusteractivitystream/zz_controller.go b/internal/controller/rds/clusteractivitystream/zz_controller.go index c2d22e8..484bbe0 100755 --- a/internal/controller/rds/clusteractivitystream/zz_controller.go +++ b/internal/controller/rds/clusteractivitystream/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterActivityStream_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterActivityStream_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_activity_stream"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterActivityStream_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_activity_stream"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterActivityStream_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterActivityStream_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterActivityStream{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterActivityStream{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clusterendpoint/zz_controller.go b/internal/controller/rds/clusterendpoint/zz_controller.go index 579753e..0a58a17 100755 --- a/internal/controller/rds/clusterendpoint/zz_controller.go +++ b/internal/controller/rds/clusterendpoint/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterEndpoint_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterEndpoint_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_endpoint"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterEndpoint_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_endpoint"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterEndpoint_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterEndpoint_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterEndpoint{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterEndpoint{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clusterinstance/zz_controller.go b/internal/controller/rds/clusterinstance/zz_controller.go index 96eff8e..fa303c8 100755 --- a/internal/controller/rds/clusterinstance/zz_controller.go +++ b/internal/controller/rds/clusterinstance/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterInstance_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_instance"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_instance"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterInstance_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterInstance_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterInstance{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterInstance{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clusterparametergroup/zz_controller.go b/internal/controller/rds/clusterparametergroup/zz_controller.go index 059c43a..e3d3c5e 100755 --- a/internal/controller/rds/clusterparametergroup/zz_controller.go +++ b/internal/controller/rds/clusterparametergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterParameterGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_parameter_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_parameter_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterParameterGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterParameterGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterParameterGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterParameterGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clusterroleassociation/zz_controller.go b/internal/controller/rds/clusterroleassociation/zz_controller.go index d827e85..e735f76 100755 --- a/internal/controller/rds/clusterroleassociation/zz_controller.go +++ b/internal/controller/rds/clusterroleassociation/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterRoleAssociation_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterRoleAssociation_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_role_association"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterRoleAssociation_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster_role_association"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterRoleAssociation_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterRoleAssociation_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterRoleAssociation{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterRoleAssociation{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/clustersnapshot/zz_controller.go b/internal/controller/rds/clustersnapshot/zz_controller.go index aa226ef..bcd729b 100755 --- a/internal/controller/rds/clustersnapshot/zz_controller.go +++ b/internal/controller/rds/clustersnapshot/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ClusterSnapshot_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_cluster_snapshot"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_cluster_snapshot"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ClusterSnapshot_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ClusterSnapshot_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ClusterSnapshot{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ClusterSnapshot{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/dbinstanceautomatedbackupsreplication/zz_controller.go b/internal/controller/rds/dbinstanceautomatedbackupsreplication/zz_controller.go index aa8e40d..5a5c105 100755 --- a/internal/controller/rds/dbinstanceautomatedbackupsreplication/zz_controller.go +++ b/internal/controller/rds/dbinstanceautomatedbackupsreplication/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DBInstanceAutomatedBackupsReplication_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DBInstanceAutomatedBackupsReplication_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_instance_automated_backups_replication"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DBInstanceAutomatedBackupsReplication_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_instance_automated_backups_replication"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.DBInstanceAutomatedBackupsReplication_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DBInstanceAutomatedBackupsReplication_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DBInstanceAutomatedBackupsReplication{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DBInstanceAutomatedBackupsReplication{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/dbsnapshotcopy/zz_controller.go b/internal/controller/rds/dbsnapshotcopy/zz_controller.go index 73696b7..a07d922 100755 --- a/internal/controller/rds/dbsnapshotcopy/zz_controller.go +++ b/internal/controller/rds/dbsnapshotcopy/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DBSnapshotCopy_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DBSnapshotCopy_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_snapshot_copy"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DBSnapshotCopy_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_snapshot_copy"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.DBSnapshotCopy_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DBSnapshotCopy_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DBSnapshotCopy{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DBSnapshotCopy{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/eventsubscription/zz_controller.go b/internal/controller/rds/eventsubscription/zz_controller.go index 5bd44d9..807204c 100755 --- a/internal/controller/rds/eventsubscription/zz_controller.go +++ b/internal/controller/rds/eventsubscription/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.EventSubscription_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_event_subscription"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_event_subscription"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.EventSubscription_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.EventSubscription_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.EventSubscription{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.EventSubscription{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/globalcluster/zz_controller.go b/internal/controller/rds/globalcluster/zz_controller.go index ba3a579..23b7a95 100755 --- a/internal/controller/rds/globalcluster/zz_controller.go +++ b/internal/controller/rds/globalcluster/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalCluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_global_cluster"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_rds_global_cluster"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.GlobalCluster_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalCluster_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.GlobalCluster{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalCluster{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/instance/zz_controller.go b/internal/controller/rds/instance/zz_controller.go index 39e1a2a..9087cda 100755 --- a/internal/controller/rds/instance/zz_controller.go +++ b/internal/controller/rds/instance/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -34,19 +39,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Instance_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Instance_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_instance"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Instance_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_instance"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Instance_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Instance_GroupVersionKind), opts...) @@ -54,6 +68,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Instance{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Instance{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/instanceroleassociation/zz_controller.go b/internal/controller/rds/instanceroleassociation/zz_controller.go index a0c04eb..4bb0301 100755 --- a/internal/controller/rds/instanceroleassociation/zz_controller.go +++ b/internal/controller/rds/instanceroleassociation/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.InstanceRoleAssociation_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.InstanceRoleAssociation_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_instance_role_association"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.InstanceRoleAssociation_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_instance_role_association"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.InstanceRoleAssociation_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.InstanceRoleAssociation_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.InstanceRoleAssociation{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.InstanceRoleAssociation{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/optiongroup/zz_controller.go b/internal/controller/rds/optiongroup/zz_controller.go index 4aa2bc9..c328144 100755 --- a/internal/controller/rds/optiongroup/zz_controller.go +++ b/internal/controller/rds/optiongroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OptionGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OptionGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_option_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OptionGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_option_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.OptionGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OptionGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.OptionGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.OptionGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/parametergroup/zz_controller.go b/internal/controller/rds/parametergroup/zz_controller.go index 09d56d5..0433152 100755 --- a/internal/controller/rds/parametergroup/zz_controller.go +++ b/internal/controller/rds/parametergroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ParameterGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_parameter_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_parameter_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ParameterGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ParameterGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ParameterGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ParameterGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/proxy/zz_controller.go b/internal/controller/rds/proxy/zz_controller.go index ba4deed..e282ac0 100755 --- a/internal/controller/rds/proxy/zz_controller.go +++ b/internal/controller/rds/proxy/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Proxy_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Proxy_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_proxy"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Proxy_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_proxy"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Proxy_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Proxy_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Proxy{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Proxy{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/proxydefaulttargetgroup/zz_controller.go b/internal/controller/rds/proxydefaulttargetgroup/zz_controller.go index 6bece6b..2bc87eb 100755 --- a/internal/controller/rds/proxydefaulttargetgroup/zz_controller.go +++ b/internal/controller/rds/proxydefaulttargetgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ProxyDefaultTargetGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyDefaultTargetGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_default_target_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyDefaultTargetGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_default_target_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ProxyDefaultTargetGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProxyDefaultTargetGroup_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ProxyDefaultTargetGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ProxyDefaultTargetGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/proxyendpoint/zz_controller.go b/internal/controller/rds/proxyendpoint/zz_controller.go index 10dabe9..41fb6a3 100755 --- a/internal/controller/rds/proxyendpoint/zz_controller.go +++ b/internal/controller/rds/proxyendpoint/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ProxyEndpoint_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyEndpoint_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_endpoint"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyEndpoint_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_endpoint"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ProxyEndpoint_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProxyEndpoint_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ProxyEndpoint{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ProxyEndpoint{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/proxytarget/zz_controller.go b/internal/controller/rds/proxytarget/zz_controller.go index 98222ce..710672a 100755 --- a/internal/controller/rds/proxytarget/zz_controller.go +++ b/internal/controller/rds/proxytarget/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -30,19 +35,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ProxyTarget_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyTarget_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_target"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProxyTarget_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_proxy_target"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.ProxyTarget_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProxyTarget_GroupVersionKind), opts...) @@ -50,6 +64,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ProxyTarget{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ProxyTarget{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/snapshot/zz_controller.go b/internal/controller/rds/snapshot/zz_controller.go index a1c6d91..2c025ff 100755 --- a/internal/controller/rds/snapshot/zz_controller.go +++ b/internal/controller/rds/snapshot/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Snapshot_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_snapshot"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_snapshot"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Snapshot_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Snapshot_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Snapshot{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Snapshot{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/subnetgroup/zz_controller.go b/internal/controller/rds/subnetgroup/zz_controller.go index 3218b59..686dab6 100755 --- a/internal/controller/rds/subnetgroup/zz_controller.go +++ b/internal/controller/rds/subnetgroup/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,8 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "kubedb.dev/provider-aws/apis/rds/v1alpha1" @@ -31,19 +36,28 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SubnetGroup_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_subnet_group"], tjcontroller.WithLogger(o.Logger), - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind))), - )), + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_db_subnet_group"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.SubnetGroup_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SubnetGroup_GroupVersionKind), opts...) @@ -51,6 +65,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.SubnetGroup{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SubnetGroup{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/secretsmanager/secret/zz_controller.go b/internal/controller/secretsmanager/secret/zz_controller.go new file mode 100755 index 0000000..0cb0864 --- /dev/null +++ b/internal/controller/secretsmanager/secret/zz_controller.go @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package secret + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/secretsmanager/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles Secret managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Secret_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Secret_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Secret_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_secretsmanager_secret"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Secret_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Secret_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Secret{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/sns/topic/zz_controller.go b/internal/controller/sns/topic/zz_controller.go new file mode 100755 index 0000000..332f047 --- /dev/null +++ b/internal/controller/sns/topic/zz_controller.go @@ -0,0 +1,71 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package topic + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "kubedb.dev/provider-aws/apis/sns/v1alpha1" + features "kubedb.dev/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles Topic managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Topic_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Topic_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Topic_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewNoForkAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_sns_topic"], + tjcontroller.WithNoForkAsyncLogger(o.Logger), + tjcontroller.WithNoForkAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithNoForkAsyncCallbackProvider(ac), + tjcontroller.WithNoForkAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.Topic_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithNoForkAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewNoForkFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Topic_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Topic{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 43c9ebe..6d69b0d 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -1,13 +1,13 @@ -/* -Copyright 2021 Upbound Inc. -*/ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 package controller import ( ctrl "sigs.k8s.io/controller-runtime" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" cluster "kubedb.dev/provider-aws/internal/controller/docdb/cluster" clusterinstance "kubedb.dev/provider-aws/internal/controller/docdb/clusterinstance" @@ -24,7 +24,11 @@ import ( tablereplica "kubedb.dev/provider-aws/internal/controller/dynamodb/tablereplica" tag "kubedb.dev/provider-aws/internal/controller/dynamodb/tag" route "kubedb.dev/provider-aws/internal/controller/ec2/route" + securitygroup "kubedb.dev/provider-aws/internal/controller/ec2/securitygroup" securitygrouprule "kubedb.dev/provider-aws/internal/controller/ec2/securitygrouprule" + subnet "kubedb.dev/provider-aws/internal/controller/ec2/subnet" + vpc "kubedb.dev/provider-aws/internal/controller/ec2/vpc" + vpcendpoint "kubedb.dev/provider-aws/internal/controller/ec2/vpcendpoint" vpcpeeringconnection "kubedb.dev/provider-aws/internal/controller/ec2/vpcpeeringconnection" clusterelasticache "kubedb.dev/provider-aws/internal/controller/elasticache/cluster" parametergroup "kubedb.dev/provider-aws/internal/controller/elasticache/parametergroup" @@ -35,6 +39,7 @@ import ( domain "kubedb.dev/provider-aws/internal/controller/elasticsearch/domain" domainpolicy "kubedb.dev/provider-aws/internal/controller/elasticsearch/domainpolicy" domainsamloptions "kubedb.dev/provider-aws/internal/controller/elasticsearch/domainsamloptions" + role "kubedb.dev/provider-aws/internal/controller/iam/role" clusterkafka "kubedb.dev/provider-aws/internal/controller/kafka/cluster" configuration "kubedb.dev/provider-aws/internal/controller/kafka/configuration" stream "kubedb.dev/provider-aws/internal/controller/kinesis/stream" @@ -66,6 +71,8 @@ import ( proxytarget "kubedb.dev/provider-aws/internal/controller/rds/proxytarget" snapshotrds "kubedb.dev/provider-aws/internal/controller/rds/snapshot" subnetgrouprds "kubedb.dev/provider-aws/internal/controller/rds/subnetgroup" + secret "kubedb.dev/provider-aws/internal/controller/secretsmanager/secret" + topic "kubedb.dev/provider-aws/internal/controller/sns/topic" ) // Setup creates all controllers with the supplied logger and adds them to @@ -87,7 +94,11 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { tablereplica.Setup, tag.Setup, route.Setup, + securitygroup.Setup, securitygrouprule.Setup, + subnet.Setup, + vpc.Setup, + vpcendpoint.Setup, vpcpeeringconnection.Setup, clusterelasticache.Setup, parametergroup.Setup, @@ -98,6 +109,7 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { domain.Setup, domainpolicy.Setup, domainsamloptions.Setup, + role.Setup, clusterkafka.Setup, configuration.Setup, stream.Setup, @@ -129,6 +141,8 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { proxytarget.Setup, snapshotrds.Setup, subnetgrouprds.Setup, + secret.Setup, + topic.Setup, } { if err := setup(mgr, o); err != nil { return err diff --git a/internal/features/features.go b/internal/features/features.go index 1b37951..96fd480 100644 --- a/internal/features/features.go +++ b/internal/features/features.go @@ -4,17 +4,19 @@ package features -import "github.com/crossplane/crossplane-runtime/pkg/feature" +import ( + xpfeature "github.com/crossplane/crossplane-runtime/pkg/feature" +) // Feature flags. const ( // EnableAlphaExternalSecretStores enables alpha support for // External Secret Stores. See the below design for more details. // https://github.com/crossplane/crossplane/blob/390ddd/design/design-doc-external-secret-stores.md - EnableAlphaExternalSecretStores feature.Flag = "EnableAlphaExternalSecretStores" + EnableAlphaExternalSecretStores xpfeature.Flag = "EnableAlphaExternalSecretStores" - // EnableAlphaManagementPolicies enables alpha support for + // EnableBetaManagementPolicies enables beta support for // Management Policies. See the below design for more details. // https://github.com/crossplane/crossplane/pull/3531 - EnableAlphaManagementPolicies feature.Flag = "EnableAlphaManagementPolicies" + EnableBetaManagementPolicies xpfeature.Flag = xpfeature.EnableBetaManagementPolicies ) diff --git a/internal/version/version.go b/internal/version/version.go new file mode 100644 index 0000000..dad0bc0 --- /dev/null +++ b/internal/version/version.go @@ -0,0 +1,9 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Package version contains the version of provider-aws repo +package version + +// Version will be overridden with the current version at build time using the -X linker flag +var Version = "0.0.0" diff --git a/package/crds/aws.kubedb.com_providerconfigs.yaml b/package/crds/aws.kubedb.com_providerconfigs.yaml index 0964488..fa506ca 100644 --- a/package/crds/aws.kubedb.com_providerconfigs.yaml +++ b/package/crds/aws.kubedb.com_providerconfigs.yaml @@ -3,15 +3,14 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: providerconfigs.aws.kubedb.com spec: group: aws.kubedb.com names: categories: - crossplane - - provider + - providerconfig - aws kind: ProviderConfig listKind: ProviderConfigList @@ -23,14 +22,14 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - - jsonPath: .spec.credentials.secretRef.name - name: SECRET-NAME + - jsonPath: .spec.source + name: SOURCE priority: 1 type: string name: v1beta1 schema: openAPIV3Schema: - description: A ProviderConfig configures a AWS provider. + description: A ProviderConfig configures the AWS provider. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -47,6 +46,52 @@ spec: spec: description: A ProviderConfigSpec defines the desired state of a ProviderConfig. properties: + assumeRoleChain: + description: AssumeRoleChain defines the options for assuming an IAM + role + items: + description: AssumeRoleOptions define the options for assuming an + IAM Role Fields are similar to the STS AssumeRoleOptions in the + AWS SDK + properties: + externalID: + description: ExternalID is the external ID used when assuming + role. + type: string + roleARN: + description: AssumeRoleARN to assume with provider credentials + type: string + tags: + description: Tags is list of session tags that you want to pass. + Each session tag consists of a key name and an associated + value. For more information about session tags, see Tagging + STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html). + items: + description: Tag is session tag that can be used to assume + an IAM Role + properties: + key: + description: Name of the tag. Key is a required field + type: string + value: + description: Value of the tag. Value is a required field + type: string + required: + - key + - value + type: object + type: array + transitiveTagKeys: + description: TransitiveTagKeys is a list of keys for session + tags that you want to set as transitive. If you set a tag + key as transitive, the corresponding key and value passes + to subsequent sessions in a role chain. For more information, + see Chaining Roles with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining). + items: + type: string + type: array + type: object + type: array credentials: description: Credentials required to authenticate to this provider. properties: @@ -93,13 +138,176 @@ spec: enum: - None - Secret - - InjectedIdentity - - Environment - - Filesystem + - IRSA + - WebIdentity + - Upbound type: string + upbound: + description: Upbound defines the options for authenticating using + Upbound as an identity provider. + properties: + webIdentity: + description: WebIdentity defines the options for assuming + an IAM role with a Web Identity. + properties: + roleARN: + description: AssumeRoleARN to assume with provider credentials + type: string + roleSessionName: + description: RoleSessionName is the session name, if you + wish to uniquely identify this session. + type: string + type: object + type: object + webIdentity: + description: WebIdentity defines the options for assuming an IAM + role with a Web Identity. + properties: + roleARN: + description: AssumeRoleARN to assume with provider credentials + type: string + roleSessionName: + description: RoleSessionName is the session name, if you wish + to uniquely identify this session. + type: string + type: object required: - source type: object + endpoint: + description: Endpoint is where you can override the default endpoint + configuration of AWS calls made by the provider. + properties: + hostnameImmutable: + description: "Specifies if the endpoint's hostname can be modified + by the SDK's API client. \n If the hostname is mutable the SDK + API clients may modify any part of the hostname based on the + requirements of the API, (e.g. adding, or removing content in + the hostname). Such as, Amazon S3 API client prefixing \"bucketname\" + to the hostname, or changing the hostname service name component + from \"s3.\" to \"s3-accesspoint.dualstack.\" for the dualstack + endpoint of an S3 Accesspoint resource. \n Care should be taken + when providing a custom endpoint for an API. If the endpoint + hostname is mutable, and the client cannot modify the endpoint + correctly, the operation call will most likely fail, or have + undefined behavior. \n If hostname is immutable, the SDK API + clients will not modify the hostname of the URL. This may cause + the API client not to function correctly if the API requires + the operation specific hostname values to be used by the client. + \n This flag does not modify the API client's behavior if this + endpoint will be used instead of Endpoint Discovery, or if the + endpoint will be used to perform Endpoint Discovery. That behavior + is configured via the API Client's Options. Note that this is + effective only for resources that use AWS SDK v2." + type: boolean + partitionId: + description: The AWS partition the endpoint belongs to. + type: string + services: + description: Specifies the list of services you want endpoint + to be used for + items: + type: string + type: array + signingMethod: + description: The signing method that should be used for signing + the requests to the endpoint. + type: string + signingName: + description: The service name that should be used for signing + the requests to the endpoint. + type: string + signingRegion: + description: The region that should be used for signing the request + to the endpoint. For IAM, which doesn't have any region, us-east-1 + is used to sign the requests, which is the only signing region + of IAM. + type: string + source: + description: The source of the Endpoint. By default, this will + be ServiceMetadata. When providing a custom endpoint, you should + set the source as Custom. If source is not provided when providing + a custom endpoint, the SDK may not perform required host mutations + correctly. Source should be used along with HostnameImmutable + property as per the usage requirement. Note that this is effective + only for resources that use AWS SDK v2. + enum: + - ServiceMetadata + - Custom + type: string + url: + description: URL lets you configure the endpoint URL to be used + in SDK calls. + properties: + dynamic: + description: Dynamic lets you configure the behavior of endpoint + URL resolver. + properties: + host: + description: Host is the address of the main host that + the resolver will use to prepend protocol, service and + region configurations. For example, the final URL for + EC2 in us-east-1 looks like https://ec2.us-east-1.amazonaws.com + You would need to use "amazonaws.com" as Host and "https" + as protocol to have the resolver construct it. + type: string + protocol: + description: Protocol is the HTTP protocol that will be + used in the URL. Currently, only http and https are + supported. + enum: + - http + - https + type: string + required: + - host + - protocol + type: object + static: + description: Static is the full URL you'd like the AWS SDK + to use. Recommended for using tools like localstack where + a single host is exposed for all services and regions. + type: string + type: + description: You can provide a static URL that will be used + regardless of the service and region by choosing Static + type. Alternatively, you can provide configuration for dynamically + resolving the URL with the config you provide once you set + the type as Dynamic. + enum: + - Static + - Dynamic + type: string + required: + - type + type: object + required: + - url + type: object + s3_use_path_style: + description: Whether to enable the request to use path-style addressing, + i.e., https://s3.amazonaws.com/BUCKET/KEY. + type: boolean + skip_credentials_validation: + description: Whether to skip credentials validation via the STS API. + This can be useful for testing and for AWS API implementations that + do not have STS available. + type: boolean + skip_metadata_api_check: + description: Whether to skip the AWS Metadata API check Useful for + AWS API implementations that do not have a metadata API endpoint. + type: boolean + skip_region_validation: + description: Whether to skip validation of provided region name. Useful + for AWS-like implementations that use their own region names or + to bypass the validation for regions that aren't publicly available + yet. + type: boolean + skip_requesting_account_id: + description: Whether to skip requesting the account ID. Useful for + AWS API implementations that do not have the IAM, STS API, or metadata + API + type: boolean required: - credentials type: object @@ -139,6 +347,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map users: description: Users of this provider configuration. format: int64 diff --git a/package/crds/aws.kubedb.com_providerconfigusages.yaml b/package/crds/aws.kubedb.com_providerconfigusages.yaml index 91212a2..cef987b 100644 --- a/package/crds/aws.kubedb.com_providerconfigusages.yaml +++ b/package/crds/aws.kubedb.com_providerconfigusages.yaml @@ -3,15 +3,14 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: providerconfigusages.aws.kubedb.com spec: group: aws.kubedb.com names: categories: - crossplane - - provider + - providerconfig - aws kind: ProviderConfigUsage listKind: ProviderConfigUsageList diff --git a/package/crds/aws.kubedb.com_storeconfigs.yaml b/package/crds/aws.kubedb.com_storeconfigs.yaml index 409272a..65642fc 100644 --- a/package/crds/aws.kubedb.com_storeconfigs.yaml +++ b/package/crds/aws.kubedb.com_storeconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storeconfigs.aws.kubedb.com spec: group: aws.kubedb.com @@ -154,146 +153,6 @@ spec: - Vault - Plugin type: string - vault: - description: 'Vault configures a Vault secret store. Deprecated: This - API is scheduled to be removed in a future release. Vault should - be used as a plugin going forward. See https://github.com/crossplane-contrib/ess-plugin-vault - for more information.' - properties: - auth: - description: Auth configures an authentication method for Vault. - properties: - method: - description: Method configures which auth method will be used. - type: string - token: - description: Token configures Token Auth for Vault. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect - to the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location - that contains credentials that must be used to connect - to the provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key - that contains the credentials that must be used to connect - to the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem - type: string - required: - - source - type: object - required: - - method - type: object - caBundle: - description: CABundle configures CA bundle for Vault Server. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect to - the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location that - contains credentials that must be used to connect to the - provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key that - contains the credentials that must be used to connect to - the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem - type: string - required: - - source - type: object - mountPath: - description: MountPath is the mount path of the KV secrets engine. - type: string - server: - description: Server is the url of the Vault server, e.g. "https://vault.acme.org" - type: string - version: - default: v2 - description: Version of the KV Secrets engine of Vault. https://www.vaultproject.io/docs/secrets/kv - type: string - required: - - auth - - mountPath - - server - type: object required: - defaultScope type: object @@ -333,6 +192,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_clusterinstances.yaml b/package/crds/docdb.aws.kubedb.com_clusterinstances.yaml index 0a60028..a971955 100644 --- a/package/crds/docdb.aws.kubedb.com_clusterinstances.yaml +++ b/package/crds/docdb.aws.kubedb.com_clusterinstances.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterinstances.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -211,21 +210,105 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applyImmediately: + description: Specifies whether any database modifications are + applied immediately, or during the next maintenance window. + Default isfalse. + type: boolean + autoMinorVersionUpgrade: + description: This parameter does not apply to Amazon DocumentDB. + Amazon DocumentDB does not perform minor version upgrades regardless + of the value set (see docs). Default true. + type: boolean + availabilityZone: + description: The EC2 Availability Zone that the DB instance is + created in. See docs about the details. + type: string + caCertIdentifier: + description: The identifier of the CA certificate for the DB instance. + type: string + enablePerformanceInsights: + description: A value that indicates whether to enable Performance + Insights for the DB Instance. Default false. See [docs] (https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-insights.html) + about the details. + type: boolean + engine: + description: 'The name of the database engine to be used for the + DocumentDB instance. Defaults to docdb. Valid Values: docdb.' + type: string + instanceClass: + description: The instance class to use. For details on CPU and + memory, see Scaling for DocumentDB Instances. DocumentDB currently + supports the below instance classes. Please see AWS Documentation + for complete details. + type: string + performanceInsightsKmsKeyId: + description: The KMS key identifier is the key ARN, key ID, alias + ARN, or alias name for the KMS key. If you do not specify a + value for PerformanceInsightsKMSKeyId, then Amazon DocumentDB + uses your default KMS key. + type: string + preferredMaintenanceWindow: + description: 'The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". + Eg: "Mon:00:00-Mon:03:00".' + type: string + promotionTier: + description: Default 0. Failover Priority setting on instance + level. The reader who has lower tier has higher priority to + get promoter to writer. + type: number + tags: + additionalProperties: + type: string + description: A map of tags to assign to the instance. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -264,42 +347,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -398,10 +445,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: instanceClass is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.instanceClass is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.instanceClass) + || (has(self.initProvider) && has(self.initProvider.instanceClass))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterInstanceStatus defines the observed state of ClusterInstance. properties: @@ -544,6 +594,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_clusterparametergroups.yaml b/package/crds/docdb.aws.kubedb.com_clusterparametergroups.yaml index 713f3ab..268fffa 100644 --- a/package/crds/docdb.aws.kubedb.com_clusterparametergroups.yaml +++ b/package/crds/docdb.aws.kubedb.com_clusterparametergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterparametergroups.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -92,9 +91,6 @@ spec: value: description: The value of the DocumentDB parameter. type: string - required: - - name - - value type: object type: array region: @@ -116,21 +112,84 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the DocumentDB cluster parameter + group. + type: string + family: + description: The family of the DocumentDB cluster parameter group. + type: string + parameter: + description: A list of DocumentDB parameters to apply. Setting + parameters to system default values may show a difference on + imported resources. + items: + properties: + applyMethod: + description: Valid values are immediate and pending-reboot. + Defaults to pending-reboot. + type: string + name: + description: The name of the DocumentDB cluster parameter + group. + type: string + value: + description: The value of the DocumentDB parameter. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -169,42 +228,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -303,10 +326,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: family is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.family is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.family) + || (has(self.initProvider) && has(self.initProvider.family))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterParameterGroupStatus defines the observed state of ClusterParameterGroup. @@ -393,6 +419,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_clusters.yaml b/package/crds/docdb.aws.kubedb.com_clusters.yaml index d894e39..66156e9 100644 --- a/package/crds/docdb.aws.kubedb.com_clusters.yaml +++ b/package/crds/docdb.aws.kubedb.com_clusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusters.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -120,6 +119,79 @@ spec: description: The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object masterPasswordSecretRef: description: Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please @@ -192,6 +264,83 @@ spec: those inherited from the provider default_tags configuration block. type: object + vpcSecurityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + vpcSecurityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + vpcSecurityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object vpcSecurityGroupIds: description: List of VPC security groups to associate with the Cluster @@ -199,21 +348,141 @@ spec: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applyImmediately: + description: Specifies whether any cluster modifications are applied + immediately, or during the next maintenance window. Default + is false. + type: boolean + availabilityZones: + description: A list of EC2 Availability Zones that instances in + the DB cluster can be created in. + items: + type: string + type: array + backupRetentionPeriod: + description: The days to retain backups for. Default 1 + type: number + dbClusterParameterGroupName: + description: A cluster parameter group to associate with the cluster. + type: string + dbSubnetGroupName: + description: A DB subnet group to associate with this DB instance. + type: string + deletionProtection: + description: A value that indicates whether the DB cluster has + deletion protection enabled. The database can't be deleted when + deletion protection is enabled. By default, deletion protection + is disabled. + type: boolean + enabledCloudwatchLogsExports: + description: 'List of log types to export to cloudwatch. If omitted, + no logs will be exported. The following log types are supported: + audit, profiler.' + items: + type: string + type: array + engine: + description: 'The name of the database engine to be used for this + DB cluster. Defaults to docdb. Valid Values: docdb' + type: string + engineVersion: + description: The database engine version. Updating this argument + results in an outage. + type: string + finalSnapshotIdentifier: + description: The name of your final DB snapshot when this DB cluster + is deleted. If omitted, no final snapshot will be made. + type: string + globalClusterIdentifier: + description: The global cluster identifier specified on aws_docdb_global_cluster. + type: string + masterUsername: + description: Username for the master DB user. + type: string + port: + description: The port on which the DB accepts connections + type: number + preferredBackupWindow: + description: 'The daily time range during which automated backups + are created if automated backups are enabled using the BackupRetentionPeriod + parameter.Time in UTC Default: A 30-minute window selected at + random from an 8-hour block of time per regionE.g., 04:00-09:00' + type: string + preferredMaintenanceWindow: + description: The weekly time range during which system maintenance + can occur, in (UTC) e.g., wed:04:00-wed:04:30 + type: string + skipFinalSnapshot: + description: Determines whether a final DB snapshot is created + before the DB cluster is deleted. If true is specified, no DB + snapshot is created. If false is specified, a DB snapshot is + created before the DB cluster is deleted, using the value from + final_snapshot_identifier. Default is false. + type: boolean + snapshotIdentifier: + description: Specifies whether or not to create this cluster from + a snapshot. You can use either the name or ARN when specifying + a DB cluster snapshot, or the ARN when specifying a DB snapshot. + Automated snapshots should not be used for this attribute, unless + from a different cluster. Automated snapshots are deleted as + part of cluster destruction when the resource is replaced. + type: string + storageEncrypted: + description: Specifies whether the DB cluster is encrypted. The + default is false. + type: boolean + tags: + additionalProperties: + type: string + description: A map of tags to assign to the DB cluster. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -252,42 +521,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -386,8 +619,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterStatus defines the observed state of Cluster. properties: @@ -559,6 +793,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_clustersnapshots.yaml b/package/crds/docdb.aws.kubedb.com_clustersnapshots.yaml index caa858e..f1c268a 100644 --- a/package/crds/docdb.aws.kubedb.com_clustersnapshots.yaml +++ b/package/crds/docdb.aws.kubedb.com_clustersnapshots.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clustersnapshots.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -72,26 +71,121 @@ spec: description: The DocumentDB Cluster Identifier from which to take the snapshot. type: string + dbClusterIdentifierRef: + description: Reference to a Cluster in docdb to populate dbClusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbClusterIdentifierSelector: + description: Selector for a Cluster in docdb to populate dbClusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -130,42 +224,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -264,10 +322,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbClusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterSnapshotStatus defines the observed state of ClusterSnapshot. properties: @@ -355,6 +412,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_eventsubscriptions.yaml b/package/crds/docdb.aws.kubedb.com_eventsubscriptions.yaml index 89e9449..a316b4b 100644 --- a/package/crds/docdb.aws.kubedb.com_eventsubscriptions.yaml +++ b/package/crds/docdb.aws.kubedb.com_eventsubscriptions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: eventsubscriptions.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -87,6 +86,79 @@ spec: description: The Amazon Resource Name of the DocumentDB event notification subscription type: string + snsTopicArnRef: + description: Reference to a Topic in sns to populate snsTopicArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + snsTopicArnSelector: + description: Selector for a Topic in sns to populate snsTopicArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object sourceIds: description: A list of identifiers of the event sources for which events will be returned. If not specified, then all sources @@ -116,21 +188,83 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + enabled: + description: A boolean flag to enable/disable the subscription. + Defaults to true. + type: boolean + eventCategories: + description: A list of event categories for a SourceType that + you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html + or run aws docdb describe-event-categories. + items: + type: string + type: array + sourceIds: + description: A list of identifiers of the event sources for which + events will be returned. If not specified, then all sources + are included in the response. If specified, a source_type must + also be specified. + items: + type: string + type: array + sourceType: + description: The type of source that will be generating the events. + Valid options are db-instance, db-cluster, db-parameter-group, + db-security-group, db-cluster-snapshot. If not set, all sources + will be subscribed to. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -169,42 +303,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -303,10 +401,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: snsTopicArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.snsTopicArn) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: EventSubscriptionStatus defines the observed state of EventSubscription. properties: @@ -400,6 +497,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_globalclusters.yaml b/package/crds/docdb.aws.kubedb.com_globalclusters.yaml index b745a98..b2ddc75 100644 --- a/package/crds/docdb.aws.kubedb.com_globalclusters.yaml +++ b/package/crds/docdb.aws.kubedb.com_globalclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: globalclusters.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -98,27 +97,150 @@ spec: description: Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. type: string + sourceDbClusterIdentifierRef: + description: Reference to a Cluster in docdb to populate sourceDbClusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sourceDbClusterIdentifierSelector: + description: Selector for a Cluster in docdb to populate sourceDbClusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object storageEncrypted: description: Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. type: boolean type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + databaseName: + description: Name for an automatically created database on cluster + creation. + type: string + deletionProtection: + description: If the Global Cluster should have deletion protection + enabled. The database can't be deleted when this value is set + to true. The default is false. + type: boolean + engine: + description: 'Name of the database engine to be used for this + DB cluster. Current Valid values: docdb. Defaults to docdb. + Conflicts with source_db_cluster_identifier.' + type: string + engineVersion: + description: Engine version of the global database. Upgrading + the engine version will result in all cluster members being + immediately updated and will. + type: string + globalClusterIdentifier: + description: The global cluster identifier. + type: string + storageEncrypted: + description: Specifies whether the DB cluster is encrypted. The + default is false unless source_db_cluster_identifier is specified + and encrypted. + type: boolean + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -157,42 +279,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -291,10 +377,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: globalClusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.globalClusterIdentifier) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.globalClusterIdentifier is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.globalClusterIdentifier) + || (has(self.initProvider) && has(self.initProvider.globalClusterIdentifier))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: GlobalClusterStatus defines the observed state of GlobalCluster. properties: @@ -390,6 +479,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/docdb.aws.kubedb.com_subnetgroups.yaml b/package/crds/docdb.aws.kubedb.com_subnetgroups.yaml index c86eaa2..619ff83 100644 --- a/package/crds/docdb.aws.kubedb.com_subnetgroups.yaml +++ b/package/crds/docdb.aws.kubedb.com_subnetgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: subnetgroups.docdb.aws.kubedb.com spec: group: docdb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -172,21 +171,61 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the docDB subnet group. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -225,42 +264,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -359,8 +362,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SubnetGroupStatus defines the observed state of SubnetGroup. properties: @@ -428,6 +432,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_contributorinsights.yaml b/package/crds/dynamodb.aws.kubedb.com_contributorinsights.yaml index 7434201..99c6a91 100644 --- a/package/crds/dynamodb.aws.kubedb.com_contributorinsights.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_contributorinsights.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: contributorinsights.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -152,21 +151,47 @@ spec: type: object type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + indexName: + description: The global secondary index name + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -205,42 +230,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -339,8 +328,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ContributorInsightsStatus defines the observed state of ContributorInsights. properties: @@ -388,6 +378,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_globaltables.yaml b/package/crds/dynamodb.aws.kubedb.com_globaltables.yaml index c1fed26..53607cf 100644 --- a/package/crds/dynamodb.aws.kubedb.com_globaltables.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_globaltables.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: globaltables.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -81,26 +80,58 @@ spec: description: AWS region name of replica DynamoDB TableE.g., us-east-1 type: string - required: - - regionName type: object type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + replica: + description: Underlying DynamoDB Table. At least 1 replica must + be defined. See below. + items: + properties: + regionName: + description: AWS region name of replica DynamoDB TableE.g., + us-east-1 + type: string + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -139,42 +170,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -273,10 +268,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: replica is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.replica) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.replica is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.replica) + || (has(self.initProvider) && has(self.initProvider.replica))' status: description: GlobalTableStatus defines the observed state of GlobalTable. properties: @@ -333,6 +331,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_kinesisstreamingdestinations.yaml b/package/crds/dynamodb.aws.kubedb.com_kinesisstreamingdestinations.yaml index 780d840..7ca397c 100644 --- a/package/crds/dynamodb.aws.kubedb.com_kinesisstreamingdestinations.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_kinesisstreamingdestinations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: kinesisstreamingdestinations.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -59,7 +58,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -228,21 +227,43 @@ spec: type: object type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -281,42 +302,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -415,8 +400,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: KinesisStreamingDestinationStatus defines the observed state of KinesisStreamingDestination. @@ -469,6 +455,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_tableitems.yaml b/package/crds/dynamodb.aws.kubedb.com_tableitems.yaml index 003ba06..fa56558 100644 --- a/package/crds/dynamodb.aws.kubedb.com_tableitems.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_tableitems.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: tableitems.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -163,21 +162,58 @@ spec: type: object type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + hashKey: + description: Hash key to use for lookups and identification of + the item + type: string + item: + description: JSON representation of a map of attribute name/value + pairs, one for each attribute. Only the primary key attributes + are required; you can optionally provide other attribute name-value + pairs for the item. + type: string + rangeKey: + description: Range key to use for lookups and identification of + the item. Required if there is range key defined in the table. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -216,42 +252,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -350,12 +350,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: hashKey is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.hashKey) - - message: item is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.item) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.hashKey is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.hashKey) + || (has(self.initProvider) && has(self.initProvider.hashKey))' + - message: spec.forProvider.item is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.item) + || (has(self.initProvider) && has(self.initProvider.item))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: TableItemStatus defines the observed state of TableItem. properties: @@ -414,6 +419,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_tablereplicas.yaml b/package/crds/dynamodb.aws.kubedb.com_tablereplicas.yaml index f1b8abb..2f48347 100644 --- a/package/crds/dynamodb.aws.kubedb.com_tablereplicas.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_tablereplicas.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: tablereplicas.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -72,6 +71,79 @@ spec: description: ARN of the main or global table which this resource will replicate. type: string + globalTableArnRef: + description: Reference to a Table in dynamodb to populate globalTableArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + globalTableArnSelector: + description: Selector for a Table in dynamodb to populate globalTableArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object kmsKeyArn: description: 'ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is @@ -79,6 +151,79 @@ spec: Note: This attribute will not be populated with the ARN of default keys.' type: string + kmsKeyArnRef: + description: Reference to a Key in kms to populate kmsKeyArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyArnSelector: + description: Selector for a Key in kms to populate kmsKeyArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object pointInTimeRecovery: description: Whether to enable Point In Time Recovery for the replica. Default is false. @@ -107,21 +252,67 @@ spec: inherited from the provider default_tags configuration block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + pointInTimeRecovery: + description: Whether to enable Point In Time Recovery for the + replica. Default is false. + type: boolean + tableClassOverride: + description: Storage class of the table replica. Valid values + are STANDARD and STANDARD_INFREQUENT_ACCESS. If not used, the + table replica will use the same class as the global table. + type: string + tags: + additionalProperties: + type: string + description: Map of tags to populate on the created table. If + configured with a provider default_tags configuration block + present, tags with matching keys will overwrite those defined + at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -160,42 +351,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -294,10 +449,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: globalTableArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.globalTableArn) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: TableReplicaStatus defines the observed state of TableReplica. properties: @@ -378,6 +532,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_tables.yaml b/package/crds/dynamodb.aws.kubedb.com_tables.yaml index 55874de..161e5ff 100644 --- a/package/crds/dynamodb.aws.kubedb.com_tables.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_tables.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: tables.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -80,9 +79,6 @@ spec: description: Attribute type. Valid values are S (string), N (number), B (binary). type: string - required: - - name - - type type: object type: array billingMode: @@ -133,10 +129,6 @@ spec: description: Number of write units for this index. Must be set if billing_mode is set to PROVISIONED. type: number - required: - - hashKey - - name - - projectionType type: object type: array hashKey: @@ -170,10 +162,6 @@ spec: rangeKey: description: Name of the range key. type: string - required: - - name - - projectionType - - rangeKey type: object type: array pointInTimeRecovery: @@ -185,8 +173,6 @@ spec: can take 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided, this defaults to false. type: boolean - required: - - enabled type: object type: array rangeKey: @@ -231,8 +217,6 @@ spec: regionName: description: Region name of the replica. type: string - required: - - regionName type: object type: array restoreDateTime: @@ -270,8 +254,6 @@ spec: key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys.' type: string - required: - - enabled type: object type: array streamEnabled: @@ -311,8 +293,6 @@ spec: enabled: description: Whether TTL is enabled. type: boolean - required: - - attributeName type: object type: array writeCapacity: @@ -320,21 +300,272 @@ spec: is PROVISIONED, this field is required. type: number type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + attribute: + description: Set of nested attribute definitions. Only required + for hash_key and range_key attributes. See below. + items: + properties: + name: + description: Name of the attribute + type: string + type: + description: Attribute type. Valid values are S (string), + N (number), B (binary). + type: string + type: object + type: array + billingMode: + description: Controls how you are charged for read and write throughput + and how you manage capacity. The valid values are PROVISIONED + and PAY_PER_REQUEST. Defaults to PROVISIONED. + type: string + deletionProtectionEnabled: + description: Enables deletion protection for table. Defaults to + false. + type: boolean + globalSecondaryIndex: + description: Describe a GSI for the table; subject to the normal + limits on the number of GSIs, projected attributes, etc. See + below. + items: + properties: + hashKey: + description: Name of the hash key in the index; must be + defined as an attribute in the resource. + type: string + name: + description: Name of the index. + type: string + nonKeyAttributes: + description: Only required with INCLUDE as a projection + type; a list of attributes to project into the index. + These do not need to be defined as attributes on the table. + items: + type: string + type: array + projectionType: + description: One of ALL, INCLUDE or KEYS_ONLY where ALL + projects every attribute into the index, KEYS_ONLY projects into + the index only the table and index hash_key and sort_key + attributes , INCLUDE projects into the index all of the + attributes that are defined in non_key_attributes in addition + to the attributes that thatKEYS_ONLY project. + type: string + rangeKey: + description: Name of the range key; must be defined + type: string + readCapacity: + description: Number of read units for this index. Must be + set if billing_mode is set to PROVISIONED. + type: number + writeCapacity: + description: Number of write units for this index. Must + be set if billing_mode is set to PROVISIONED. + type: number + type: object + type: array + hashKey: + description: Attribute to use as the hash (partition) key. Must + also be defined as an attribute. See below. + type: string + localSecondaryIndex: + description: Describe an LSI on the table; these can only be allocated + at creation so you cannot change this definition after you have + created the resource. See below. + items: + properties: + name: + description: Name of the index + type: string + nonKeyAttributes: + description: Only required with INCLUDE as a projection + type; a list of attributes to project into the index. + These do not need to be defined as attributes on the table. + items: + type: string + type: array + projectionType: + description: One of ALL, INCLUDE or KEYS_ONLY where ALL + projects every attribute into the index, KEYS_ONLY projects into + the index only the table and index hash_key and sort_key + attributes , INCLUDE projects into the index all of the + attributes that are defined in non_key_attributes in addition + to the attributes that thatKEYS_ONLY project. + type: string + rangeKey: + description: Name of the range key. + type: string + type: object + type: array + pointInTimeRecovery: + description: Enable point-in-time recovery options. See below. + items: + properties: + enabled: + description: Whether to enable point-in-time recovery. It + can take 10 minutes to enable for new tables. If the point_in_time_recovery + block is not provided, this defaults to false. + type: boolean + type: object + type: array + rangeKey: + description: Attribute to use as the range (sort) key. Must also + be defined as an attribute, see below. + type: string + readCapacity: + description: Number of read units for this table. If the billing_mode + is PROVISIONED, this field is required. + type: number + replica: + description: Configuration block(s) with DynamoDB Global Tables + V2 (version 2019.11.21) replication configurations. See below. + items: + properties: + kmsKeyArn: + description: 'ARN of the CMK that should be used for the + AWS KMS encryption. This argument should only be used + if the key is different from the default KMS-managed DynamoDB + key, alias/aws/dynamodb. Note: This attribute will not + be populated with the ARN of default keys.' + type: string + pointInTimeRecovery: + description: Whether to enable Point In Time Recovery for + the replica. Default is false. + type: boolean + propagateTags: + description: 'Whether to propagate the global table''s tags + to a replica. Default is false. Changes to tags only move + in one direction: from global (source) to replica. In + other words, tag drift on a replica will not trigger an + update. Tag or replica changes on the global table, whether + from drift or configuration changes, are propagated to + replicas. Changing from true to false on a subsequent + apply means replica tags are left as they were, unmanaged, + not deleted.' + type: boolean + regionName: + description: Region name of the replica. + type: string + type: object + type: array + restoreDateTime: + description: Time of the point-in-time recovery point to restore. + type: string + restoreSourceName: + description: Name of the table to restore. Must match the name + of an existing table. + type: string + restoreToLatestTime: + description: If set, restores table to the most recent point-in-time + recovery point. + type: boolean + serverSideEncryption: + description: Encryption at rest options. AWS DynamoDB tables are + automatically encrypted at rest with an AWS-owned Customer Master + Key if this argument isn't specified. See below. + items: + properties: + enabled: + description: Whether or not to enable encryption at rest + using an AWS managed KMS customer master key (CMK). If + enabled is false then server-side encryption is set to + AWS-owned key (shown as DEFAULT in the AWS console). Potentially + confusingly, if enabled is true and no kms_key_arn is + specified then server-side encryption is set to the default + KMS-managed key (shown as KMS in the AWS console). The + AWS KMS documentation explains the difference between + AWS-owned and KMS-managed keys. + type: boolean + kmsKeyArn: + description: 'ARN of the CMK that should be used for the + AWS KMS encryption. This argument should only be used + if the key is different from the default KMS-managed DynamoDB + key, alias/aws/dynamodb. Note: This attribute will not + be populated with the ARN of default keys.' + type: string + type: object + type: array + streamEnabled: + description: Whether Streams are enabled. + type: boolean + streamViewType: + description: When an item in the table is modified, StreamViewType + determines what information is written to the table's stream. + Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES. + type: string + tableClass: + description: Storage class of the table. Valid values are STANDARD + and STANDARD_INFREQUENT_ACCESS. Default value is STANDARD. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to populate on the created table. If + configured with a provider default_tags configuration block + present, tags with matching keys will overwrite those defined + at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + ttl: + description: Configuration block for TTL. See below. + items: + properties: + attributeName: + description: Name of the table attribute to store the TTL + timestamp in. + type: string + enabled: + description: Whether TTL is enabled. + type: boolean + type: object + type: array + writeCapacity: + description: Number of write units for this table. If the billing_mode + is PROVISIONED, this field is required. + type: number + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -373,42 +604,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -507,8 +702,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: TableStatus defines the observed state of Table. properties: @@ -809,6 +1005,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/dynamodb.aws.kubedb.com_tags.yaml b/package/crds/dynamodb.aws.kubedb.com_tags.yaml index 5679b12..9a7d0a3 100644 --- a/package/crds/dynamodb.aws.kubedb.com_tags.yaml +++ b/package/crds/dynamodb.aws.kubedb.com_tags.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: tags.dynamodb.aws.kubedb.com spec: group: dynamodb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -86,21 +85,47 @@ spec: - key - resourceArn type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + value: + description: Tag value. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -139,42 +164,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -273,10 +262,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: value is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.value) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.value is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.value) + || (has(self.initProvider) && has(self.initProvider.value))' status: description: TagStatus defines the observed state of Tag. properties: @@ -330,6 +322,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ec2.aws.kubedb.com_routes.yaml b/package/crds/ec2.aws.kubedb.com_routes.yaml index a819f2b..047c42c 100644 --- a/package/crds/ec2.aws.kubedb.com_routes.yaml +++ b/package/crds/ec2.aws.kubedb.com_routes.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: routes.ec2.aws.kubedb.com spec: group: ec2.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -119,21 +118,90 @@ spec: description: Identifier of a VPC peering connection. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + carrierGatewayId: + description: Identifier of a carrier gateway. This attribute can + only be used when the VPC contains a subnet which is associated + with a Wavelength Zone. + type: string + coreNetworkArn: + description: The Amazon Resource Name (ARN) of a core network. + type: string + destinationCidrBlock: + description: The destination CIDR block. + type: string + destinationIpv6CidrBlock: + description: The destination IPv6 CIDR block. + type: string + destinationPrefixListId: + description: The ID of a managed prefix list destination. + type: string + egressOnlyGatewayId: + description: Identifier of a VPC Egress Only Internet Gateway. + type: string + gatewayId: + description: Identifier of a VPC internet gateway or a virtual + private gateway. Specify local when updating a previously imported + local route. + type: string + localGatewayId: + description: Identifier of a Outpost local gateway. + type: string + natGatewayId: + description: Identifier of a VPC NAT gateway. + type: string + networkInterfaceId: + description: Identifier of an EC2 network interface. + type: string + routeTableId: + description: The ID of the routing table. + type: string + transitGatewayId: + description: Identifier of an EC2 Transit Gateway. + type: string + vpcEndpointId: + description: Identifier of a VPC Endpoint. + type: string + vpcPeeringConnectionId: + description: Identifier of a VPC peering connection. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -172,42 +240,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -306,10 +338,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: routeTableId is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.routeTableId) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.routeTableId is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.routeTableId) + || (has(self.initProvider) && has(self.initProvider.routeTableId))' status: description: RouteStatus defines the observed state of Route. properties: @@ -412,6 +447,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ec2.aws.kubedb.com_securitygrouprules.yaml b/package/crds/ec2.aws.kubedb.com_securitygrouprules.yaml index f835caa..71afbd8 100644 --- a/package/crds/ec2.aws.kubedb.com_securitygrouprules.yaml +++ b/package/crds/ec2.aws.kubedb.com_securitygrouprules.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: securitygrouprules.ec2.aws.kubedb.com spec: group: ec2.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -103,6 +102,79 @@ spec: securityGroupId: description: Security group to apply this rule to. type: string + securityGroupIdRef: + description: Reference to a SecurityGroup in ec2 to populate securityGroupId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + securityGroupIdSelector: + description: Selector for a SecurityGroup in ec2 to populate securityGroupId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object self: description: Whether the security group itself will be added as a source to this ingress rule. Cannot be specified with cidr_blocks, @@ -121,21 +193,89 @@ spec: (inbound) or egress (outbound). type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + cidrBlocks: + description: List of CIDR blocks. Cannot be specified with source_security_group_id + or self. + items: + type: string + type: array + description: + description: Description of the rule. + type: string + fromPort: + description: Start port (or ICMP type number if protocol is "icmp" + or "icmpv6"). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. Cannot be specified with + source_security_group_id or self. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If not icmp, icmpv6, tcp, udp, or all use + the protocol number + type: string + self: + description: Whether the security group itself will be added as + a source to this ingress rule. Cannot be specified with cidr_blocks, + ipv6_cidr_blocks, or source_security_group_id. + type: boolean + sourceSecurityGroupId: + description: Security group id to allow access to/from, depending + on the type. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, + or self. + type: string + toPort: + description: End port (or ICMP code if protocol is "icmp"). + type: number + type: + description: Type of rule being created. Valid options are ingress + (inbound) or egress (outbound). + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -174,42 +314,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -308,18 +412,25 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: fromPort is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.fromPort) - - message: protocol is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.protocol) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: securityGroupId is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.securityGroupId) - - message: toPort is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.toPort) - - message: type is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.type) + - message: spec.forProvider.fromPort is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.fromPort) + || (has(self.initProvider) && has(self.initProvider.fromPort))' + - message: spec.forProvider.protocol is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.protocol) + || (has(self.initProvider) && has(self.initProvider.protocol))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.toPort is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.toPort) + || (has(self.initProvider) && has(self.initProvider.toPort))' + - message: spec.forProvider.type is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.type) + || (has(self.initProvider) && has(self.initProvider.type))' status: description: SecurityGroupRuleStatus defines the observed state of SecurityGroupRule. properties: @@ -415,6 +526,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ec2.aws.kubedb.com_securitygroups.yaml b/package/crds/ec2.aws.kubedb.com_securitygroups.yaml new file mode 100644 index 0000000..6744c2a --- /dev/null +++ b/package/crds/ec2.aws.kubedb.com_securitygroups.yaml @@ -0,0 +1,830 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: securitygroups.ec2.aws.kubedb.com +spec: + group: ec2.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: SecurityGroup + listKind: SecurityGroupList + plural: securitygroups + singular: securitygroup + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: SecurityGroup is the Schema for the SecurityGroups API. Provides + a security group resource. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SecurityGroupSpec defines the desired state of SecurityGroup + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + description: + description: 'Security group description. Cannot be "". NOTE: + This field maps to the AWS GroupDescription attribute, for which + there is no Update API. If you''d like to classify your security + groups in a way that can be updated, use tags.' + type: string + egress: + description: Configuration block for egress rules. Can be specified + multiple times for each egress rule. Each egress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + ingress: + description: Configuration block for ingress rules. Can be specified + multiple times for each ingress rule. Each ingress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + name: + description: Name of the security group. + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + region: + description: Region is the region you'd like your resource to + be created in. + type: string + revokeRulesOnDelete: + description: This is normally not needed, however certain AWS + services such as Elastic Map Reduce may automatically add required + rules to security groups used with the service, and those rules + may contain a cyclic dependency that prevent the security groups + from being destroyed without removing the dependency first. + Default false. + type: boolean + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcId: + description: VPC ID. Defaults to the region's default VPC. + type: string + vpcIdRef: + description: Reference to a VPC in ec2 to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in ec2 to populate vpcId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: 'Security group description. Cannot be "". NOTE: + This field maps to the AWS GroupDescription attribute, for which + there is no Update API. If you''d like to classify your security + groups in a way that can be updated, use tags.' + type: string + egress: + description: Configuration block for egress rules. Can be specified + multiple times for each egress rule. Each egress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + ingress: + description: Configuration block for ingress rules. Can be specified + multiple times for each ingress rule. Each ingress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + name: + description: Name of the security group. + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + revokeRulesOnDelete: + description: This is normally not needed, however certain AWS + services such as Elastic Map Reduce may automatically add required + rules to security groups used with the service, and those rules + may contain a cyclic dependency that prevent the security groups + from being destroyed without removing the dependency first. + Default false. + type: boolean + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + status: + description: SecurityGroupStatus defines the observed state of SecurityGroup. + properties: + atProvider: + properties: + arn: + description: ARN of the security group. + type: string + description: + description: 'Security group description. Cannot be "". NOTE: + This field maps to the AWS GroupDescription attribute, for which + there is no Update API. If you''d like to classify your security + groups in a way that can be updated, use tags.' + type: string + egress: + description: Configuration block for egress rules. Can be specified + multiple times for each egress rule. Each egress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + id: + description: ID of the security group. + type: string + ingress: + description: Configuration block for ingress rules. Can be specified + multiple times for each ingress rule. Each ingress block supports + fields documented below. This argument is processed in attribute-as-blocks + mode. + items: + properties: + cidrBlocks: + description: List of CIDR blocks. + items: + type: string + type: array + description: + description: 'Security group description. Cannot be "". + NOTE: This field maps to the AWS GroupDescription attribute, + for which there is no Update API. If you''d like to classify + your security groups in a way that can be updated, use + tags.' + type: string + fromPort: + description: Start port (or ICMP type number if protocol + is icmp or icmpv6). + type: number + ipv6CidrBlocks: + description: List of IPv6 CIDR blocks. + items: + type: string + type: array + prefixListIds: + description: List of Prefix List IDs. + items: + type: string + type: array + protocol: + description: Protocol. If you select a protocol of -1 (semantically + equivalent to all, which is not a valid value here), you + must specify a from_port and to_port equal to 0. The + supported values are defined in the IpProtocol argument + on the IpPermission API reference.12. + type: string + securityGroups: + description: List of security groups. A group name can be + used relative to the default VPC. Otherwise, group ID. + items: + type: string + type: array + self: + description: Whether the security group itself will be added + as a source to this ingress rule. + type: boolean + toPort: + description: End range port (or ICMP code if protocol is + icmp). + type: number + type: object + type: array + name: + description: Name of the security group. + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + ownerId: + description: Owner ID. + type: string + revokeRulesOnDelete: + description: This is normally not needed, however certain AWS + services such as Elastic Map Reduce may automatically add required + rules to security groups used with the service, and those rules + may contain a cyclic dependency that prevent the security groups + from being destroyed without removing the dependency first. + Default false. + type: boolean + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcId: + description: VPC ID. Defaults to the region's default VPC. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/ec2.aws.kubedb.com_subnets.yaml b/package/crds/ec2.aws.kubedb.com_subnets.yaml new file mode 100644 index 0000000..1cb577e --- /dev/null +++ b/package/crds/ec2.aws.kubedb.com_subnets.yaml @@ -0,0 +1,644 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: subnets.ec2.aws.kubedb.com +spec: + group: ec2.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: Subnet + listKind: SubnetList + plural: subnets + singular: subnet + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Subnet is the Schema for the Subnets API. Provides an VPC subnet + resource. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SubnetSpec defines the desired state of Subnet + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + assignIpv6AddressOnCreation: + description: Specify true to indicate that network interfaces + created in the specified subnet should be assigned an IPv6 address. + Default is false + type: boolean + availabilityZone: + description: AZ for the subnet. + type: string + availabilityZoneId: + description: AZ ID of the subnet. This argument is not supported + in all regions or partitions. If necessary, use availability_zone + instead. + type: string + cidrBlock: + description: The IPv4 CIDR block for the subnet. + type: string + customerOwnedIpv4Pool: + description: The customer owned IPv4 address pool. Typically used + with the map_customer_owned_ip_on_launch argument. The outpost_arn + argument must be specified when configured. + type: string + enableDns64: + description: 'Indicates whether DNS queries made to the Amazon-provided + DNS Resolver in this subnet should return synthetic IPv6 addresses + for IPv4-only destinations. Default: false.' + type: boolean + enableLniAtDeviceIndex: + description: Indicates the device position for local network interfaces + in this subnet. For example, 1 indicates local network interfaces + in this subnet are the secondary network interface (eth1). A + local network interface cannot be the primary network interface + (eth0). + type: number + enableResourceNameDnsARecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS A records. Default: false.' + type: boolean + enableResourceNameDnsAaaaRecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS AAAA records. Default: false.' + type: boolean + ipv6CidrBlock: + description: The IPv6 network range for the subnet, in CIDR notation. + The subnet size must use a /64 prefix length. + type: string + ipv6Native: + description: 'Indicates whether to create an IPv6-only subnet. + Default: false.' + type: boolean + mapCustomerOwnedIpOnLaunch: + description: Specify true to indicate that network interfaces + created in the subnet should be assigned a customer owned IP + address. The customer_owned_ipv4_pool and outpost_arn arguments + must be specified when set to true. Default is false. + type: boolean + mapPublicIpOnLaunch: + description: Specify true to indicate that instances launched + into the subnet should be assigned a public IP address. Default + is false. + type: boolean + outpostArn: + description: The Amazon Resource Name (ARN) of the Outpost. + type: string + privateDnsHostnameTypeOnLaunch: + description: 'The type of hostnames to assign to instances in + the subnet at launch. For IPv6-only subnets, an instance DNS + name must be based on the instance ID. For dual-stack and IPv4-only + subnets, you can specify whether DNS names use the instance + IPv4 address or the instance ID. Valid values: ip-name, resource-name.' + type: string + region: + description: Region is the region you'd like your resource to + be created in. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcId: + description: The VPC ID. + type: string + vpcIdRef: + description: Reference to a VPC in ec2 to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in ec2 to populate vpcId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + assignIpv6AddressOnCreation: + description: Specify true to indicate that network interfaces + created in the specified subnet should be assigned an IPv6 address. + Default is false + type: boolean + availabilityZone: + description: AZ for the subnet. + type: string + availabilityZoneId: + description: AZ ID of the subnet. This argument is not supported + in all regions or partitions. If necessary, use availability_zone + instead. + type: string + cidrBlock: + description: The IPv4 CIDR block for the subnet. + type: string + customerOwnedIpv4Pool: + description: The customer owned IPv4 address pool. Typically used + with the map_customer_owned_ip_on_launch argument. The outpost_arn + argument must be specified when configured. + type: string + enableDns64: + description: 'Indicates whether DNS queries made to the Amazon-provided + DNS Resolver in this subnet should return synthetic IPv6 addresses + for IPv4-only destinations. Default: false.' + type: boolean + enableLniAtDeviceIndex: + description: Indicates the device position for local network interfaces + in this subnet. For example, 1 indicates local network interfaces + in this subnet are the secondary network interface (eth1). A + local network interface cannot be the primary network interface + (eth0). + type: number + enableResourceNameDnsARecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS A records. Default: false.' + type: boolean + enableResourceNameDnsAaaaRecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS AAAA records. Default: false.' + type: boolean + ipv6CidrBlock: + description: The IPv6 network range for the subnet, in CIDR notation. + The subnet size must use a /64 prefix length. + type: string + ipv6Native: + description: 'Indicates whether to create an IPv6-only subnet. + Default: false.' + type: boolean + mapCustomerOwnedIpOnLaunch: + description: Specify true to indicate that network interfaces + created in the subnet should be assigned a customer owned IP + address. The customer_owned_ipv4_pool and outpost_arn arguments + must be specified when set to true. Default is false. + type: boolean + mapPublicIpOnLaunch: + description: Specify true to indicate that instances launched + into the subnet should be assigned a public IP address. Default + is false. + type: boolean + outpostArn: + description: The Amazon Resource Name (ARN) of the Outpost. + type: string + privateDnsHostnameTypeOnLaunch: + description: 'The type of hostnames to assign to instances in + the subnet at launch. For IPv6-only subnets, an instance DNS + name must be based on the instance ID. For dual-stack and IPv4-only + subnets, you can specify whether DNS names use the instance + IPv4 address or the instance ID. Valid values: ip-name, resource-name.' + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + status: + description: SubnetStatus defines the observed state of Subnet. + properties: + atProvider: + properties: + arn: + description: The ARN of the subnet. + type: string + assignIpv6AddressOnCreation: + description: Specify true to indicate that network interfaces + created in the specified subnet should be assigned an IPv6 address. + Default is false + type: boolean + availabilityZone: + description: AZ for the subnet. + type: string + availabilityZoneId: + description: AZ ID of the subnet. This argument is not supported + in all regions or partitions. If necessary, use availability_zone + instead. + type: string + cidrBlock: + description: The IPv4 CIDR block for the subnet. + type: string + customerOwnedIpv4Pool: + description: The customer owned IPv4 address pool. Typically used + with the map_customer_owned_ip_on_launch argument. The outpost_arn + argument must be specified when configured. + type: string + enableDns64: + description: 'Indicates whether DNS queries made to the Amazon-provided + DNS Resolver in this subnet should return synthetic IPv6 addresses + for IPv4-only destinations. Default: false.' + type: boolean + enableLniAtDeviceIndex: + description: Indicates the device position for local network interfaces + in this subnet. For example, 1 indicates local network interfaces + in this subnet are the secondary network interface (eth1). A + local network interface cannot be the primary network interface + (eth0). + type: number + enableResourceNameDnsARecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS A records. Default: false.' + type: boolean + enableResourceNameDnsAaaaRecordOnLaunch: + description: 'Indicates whether to respond to DNS queries for + instance hostnames with DNS AAAA records. Default: false.' + type: boolean + id: + description: The ID of the subnet + type: string + ipv6CidrBlock: + description: The IPv6 network range for the subnet, in CIDR notation. + The subnet size must use a /64 prefix length. + type: string + ipv6CidrBlockAssociationId: + description: The association ID for the IPv6 CIDR block. + type: string + ipv6Native: + description: 'Indicates whether to create an IPv6-only subnet. + Default: false.' + type: boolean + mapCustomerOwnedIpOnLaunch: + description: Specify true to indicate that network interfaces + created in the subnet should be assigned a customer owned IP + address. The customer_owned_ipv4_pool and outpost_arn arguments + must be specified when set to true. Default is false. + type: boolean + mapPublicIpOnLaunch: + description: Specify true to indicate that instances launched + into the subnet should be assigned a public IP address. Default + is false. + type: boolean + outpostArn: + description: The Amazon Resource Name (ARN) of the Outpost. + type: string + ownerId: + description: The ID of the AWS account that owns the subnet. + type: string + privateDnsHostnameTypeOnLaunch: + description: 'The type of hostnames to assign to instances in + the subnet at launch. For IPv6-only subnets, an instance DNS + name must be based on the instance ID. For dual-stack and IPv4-only + subnets, you can specify whether DNS names use the instance + IPv4 address or the instance ID. Valid values: ip-name, resource-name.' + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcId: + description: The VPC ID. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/ec2.aws.kubedb.com_vpcendpoints.yaml b/package/crds/ec2.aws.kubedb.com_vpcendpoints.yaml new file mode 100644 index 0000000..d3ef6bf --- /dev/null +++ b/package/crds/ec2.aws.kubedb.com_vpcendpoints.yaml @@ -0,0 +1,793 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: vpcendpoints.ec2.aws.kubedb.com +spec: + group: ec2.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: VPCEndpoint + listKind: VPCEndpointList + plural: vpcendpoints + singular: vpcendpoint + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VPCEndpoint is the Schema for the VPCEndpoints API. Provides + a VPC Endpoint resource. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VPCEndpointSpec defines the desired state of VPCEndpoint + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + autoAccept: + description: Accept the VPC endpoint (the VPC endpoint and service + need to be in the same AWS account). + type: boolean + dnsOptions: + description: The DNS options for the endpoint. See dns_options + below. + items: + properties: + dnsRecordIpType: + description: The DNS records created for the endpoint. Valid + values are ipv4, dualstack, service-defined, and ipv6. + type: string + type: object + type: array + ipAddressType: + description: The IP address type for the endpoint. Valid values + are ipv4, dualstack, and ipv6. + type: string + policy: + description: A policy to attach to the endpoint that controls + access to the service. This is a JSON formatted string. Defaults + to full access. All Gateway and some Interface endpoints support + policies - see the relevant AWS documentation for more details. + type: string + privateDnsEnabled: + description: Whether or not to associate a private hosted zone + with the specified VPC. Applicable for endpoints of type Interface. + Defaults to false. + type: boolean + region: + description: Region is the region you'd like your resource to + be created in. + type: string + routeTableIds: + description: One or more route table IDs. Applicable for endpoints + of type Gateway. + items: + type: string + type: array + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + securityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + securityGroupIds: + description: The ID of one or more security groups to associate + with the network interface. Applicable for endpoints of type + Interface. If no security groups are specified, the VPC's default + security group is associated with the endpoint. + items: + type: string + type: array + serviceName: + description: The service name. For AWS services the service name + is usually in the form com.amazonaws.. (the + SageMaker Notebook service is an exception to this rule, the + service name is in the form aws.sagemaker..notebook). + type: string + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + subnetIds: + description: The ID of one or more subnets in which to create + a network interface for the endpoint. Applicable for endpoints + of type GatewayLoadBalancer and Interface. + items: + type: string + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcEndpointType: + description: The VPC endpoint type, Gateway, GatewayLoadBalancer, + or Interface. Defaults to Gateway. + type: string + vpcId: + description: The ID of the VPC in which the endpoint will be used. + type: string + vpcIdRef: + description: Reference to a VPC in ec2 to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in ec2 to populate vpcId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + autoAccept: + description: Accept the VPC endpoint (the VPC endpoint and service + need to be in the same AWS account). + type: boolean + dnsOptions: + description: The DNS options for the endpoint. See dns_options + below. + items: + properties: + dnsRecordIpType: + description: The DNS records created for the endpoint. Valid + values are ipv4, dualstack, service-defined, and ipv6. + type: string + type: object + type: array + ipAddressType: + description: The IP address type for the endpoint. Valid values + are ipv4, dualstack, and ipv6. + type: string + policy: + description: A policy to attach to the endpoint that controls + access to the service. This is a JSON formatted string. Defaults + to full access. All Gateway and some Interface endpoints support + policies - see the relevant AWS documentation for more details. + type: string + privateDnsEnabled: + description: Whether or not to associate a private hosted zone + with the specified VPC. Applicable for endpoints of type Interface. + Defaults to false. + type: boolean + routeTableIds: + description: One or more route table IDs. Applicable for endpoints + of type Gateway. + items: + type: string + type: array + serviceName: + description: The service name. For AWS services the service name + is usually in the form com.amazonaws.. (the + SageMaker Notebook service is an exception to this rule, the + service name is in the form aws.sagemaker..notebook). + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcEndpointType: + description: The VPC endpoint type, Gateway, GatewayLoadBalancer, + or Interface. Defaults to Gateway. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.serviceName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.serviceName) + || (has(self.initProvider) && has(self.initProvider.serviceName))' + status: + description: VPCEndpointStatus defines the observed state of VPCEndpoint. + properties: + atProvider: + properties: + arn: + description: The Amazon Resource Name (ARN) of the VPC endpoint. + type: string + autoAccept: + description: Accept the VPC endpoint (the VPC endpoint and service + need to be in the same AWS account). + type: boolean + cidrBlocks: + description: The list of CIDR blocks for the exposed AWS service. + Applicable for endpoints of type Gateway. + items: + type: string + type: array + dnsEntry: + description: The DNS entries for the VPC Endpoint. Applicable + for endpoints of type Interface. DNS blocks are documented below. + items: + properties: + dnsName: + description: The DNS name. + type: string + hostedZoneId: + description: The ID of the private hosted zone. + type: string + type: object + type: array + dnsOptions: + description: The DNS options for the endpoint. See dns_options + below. + items: + properties: + dnsRecordIpType: + description: The DNS records created for the endpoint. Valid + values are ipv4, dualstack, service-defined, and ipv6. + type: string + type: object + type: array + id: + description: The ID of the VPC endpoint. + type: string + ipAddressType: + description: The IP address type for the endpoint. Valid values + are ipv4, dualstack, and ipv6. + type: string + networkInterfaceIds: + description: One or more network interfaces for the VPC Endpoint. + Applicable for endpoints of type Interface. + items: + type: string + type: array + ownerId: + description: The ID of the AWS account that owns the VPC endpoint. + type: string + policy: + description: A policy to attach to the endpoint that controls + access to the service. This is a JSON formatted string. Defaults + to full access. All Gateway and some Interface endpoints support + policies - see the relevant AWS documentation for more details. + type: string + prefixListId: + description: The prefix list ID of the exposed AWS service. Applicable + for endpoints of type Gateway. + type: string + privateDnsEnabled: + description: Whether or not to associate a private hosted zone + with the specified VPC. Applicable for endpoints of type Interface. + Defaults to false. + type: boolean + requesterManaged: + description: Whether or not the VPC Endpoint is being managed + by its service - true or false. + type: boolean + routeTableIds: + description: One or more route table IDs. Applicable for endpoints + of type Gateway. + items: + type: string + type: array + securityGroupIds: + description: The ID of one or more security groups to associate + with the network interface. Applicable for endpoints of type + Interface. If no security groups are specified, the VPC's default + security group is associated with the endpoint. + items: + type: string + type: array + serviceName: + description: The service name. For AWS services the service name + is usually in the form com.amazonaws.. (the + SageMaker Notebook service is an exception to this rule, the + service name is in the form aws.sagemaker..notebook). + type: string + state: + description: The state of the VPC endpoint. + type: string + subnetIds: + description: The ID of one or more subnets in which to create + a network interface for the endpoint. Applicable for endpoints + of type GatewayLoadBalancer and Interface. + items: + type: string + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcEndpointType: + description: The VPC endpoint type, Gateway, GatewayLoadBalancer, + or Interface. Defaults to Gateway. + type: string + vpcId: + description: The ID of the VPC in which the endpoint will be used. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/ec2.aws.kubedb.com_vpcpeeringconnections.yaml b/package/crds/ec2.aws.kubedb.com_vpcpeeringconnections.yaml index a5594d5..d5911f8 100644 --- a/package/crds/ec2.aws.kubedb.com_vpcpeeringconnections.yaml +++ b/package/crds/ec2.aws.kubedb.com_vpcpeeringconnections.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: vpcpeeringconnections.ec2.aws.kubedb.com spec: group: ec2.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -99,6 +98,79 @@ spec: description: The ID of the VPC with which you are creating the VPC Peering Connection. type: string + peerVpcIdRef: + description: Reference to a VPC in ec2 to populate peerVpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + peerVpcIdSelector: + description: Selector for a VPC in ec2 to populate peerVpcId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -133,22 +205,172 @@ spec: vpcId: description: The ID of the requester VPC. type: string + vpcIdRef: + description: Reference to a VPC in ec2 to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in ec2 to populate vpcId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + accepter: + description: An optional configuration block that allows for VPC + Peering Connection options to be set for the VPC that accepts + the peering connection (a maximum of one). + items: + properties: + allowRemoteVpcDnsResolution: + description: Allow a local VPC to resolve public DNS hostnames + to private IP addresses when queried from instances in + the peer VPC. + type: boolean + type: object + type: array + autoAccept: + description: Accept the peering (both VPCs need to be in the same + AWS account and region). + type: boolean + peerOwnerId: + description: The AWS account ID of the owner of the peer VPC. + Defaults to the account ID the AWS provider is currently connected + to. + type: string + peerRegion: + description: The region of the accepter VPC of the VPC Peering + Connection. auto_accept must be false, and use the aws_vpc_peering_connection_accepter + to manage the accepter side. + type: string + requester: + description: A optional configuration block that allows for VPC + Peering Connection options to be set for the VPC that requests + the peering connection (a maximum of one). + items: + properties: + allowRemoteVpcDnsResolution: + description: Allow a local VPC to resolve public DNS hostnames + to private IP addresses when queried from instances in + the peer VPC. + type: boolean + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -187,42 +409,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -321,12 +507,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: peerVpcId is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.peerVpcId) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: vpcId is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcId) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: VPCPeeringConnectionStatus defines the observed state of VPCPeeringConnection. @@ -434,6 +617,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ec2.aws.kubedb.com_vpcs.yaml b/package/crds/ec2.aws.kubedb.com_vpcs.yaml new file mode 100644 index 0000000..67eecf1 --- /dev/null +++ b/package/crds/ec2.aws.kubedb.com_vpcs.yaml @@ -0,0 +1,566 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: vpcs.ec2.aws.kubedb.com +spec: + group: ec2.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: VPC + listKind: VPCList + plural: vpcs + singular: vpc + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VPC is the Schema for the VPCs API. Provides a VPC resource. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VPCSpec defines the desired state of VPC + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + assignGeneratedIpv6CidrBlock: + description: Requests an Amazon-provided IPv6 CIDR block with + a /56 prefix length for the VPC. You cannot specify the range + of IP addresses, or the size of the CIDR block. Default is false. + Conflicts with ipv6_ipam_pool_id + type: boolean + cidrBlock: + description: The IPv4 CIDR block for the VPC. CIDR can be explicitly + set or it can be derived from IPAM using ipv4_netmask_length. + type: string + enableDnsHostnames: + description: A boolean flag to enable/disable DNS hostnames in + the VPC. Defaults false. + type: boolean + enableDnsSupport: + description: A boolean flag to enable/disable DNS support in the + VPC. Defaults to true. + type: boolean + enableNetworkAddressUsageMetrics: + description: Indicates whether Network Address Usage metrics are + enabled for your VPC. Defaults to false. + type: boolean + instanceTenancy: + description: A tenancy option for instances launched into the + VPC. Default is default, which ensures that EC2 instances launched + in this VPC use the EC2 instance tenancy attribute specified + when the EC2 instance is launched. The only other option is + dedicated, which ensures that EC2 instances launched in this + VPC are run on dedicated tenancy instances regardless of the + tenancy attribute specified at launch. This has a dedicated + per region fee of $2 per hour, plus an hourly per instance usage + fee. + type: string + ipv4IpamPoolId: + description: The ID of an IPv4 IPAM pool you want to use for allocating + this VPC's CIDR. IPAM is a VPC feature that you can use to automate + your IP address management workflows including assigning, tracking, + troubleshooting, and auditing IP addresses across AWS Regions + and accounts. Using IPAM you can monitor IP address usage throughout + your AWS Organization. + type: string + ipv4NetmaskLength: + description: The netmask length of the IPv4 CIDR you want to allocate + to this VPC. Requires specifying a ipv4_ipam_pool_id. + type: number + ipv6CidrBlock: + description: IPv6 CIDR block to request from an IPAM Pool. Can + be set explicitly or derived from IPAM using ipv6_netmask_length. + type: string + ipv6CidrBlockNetworkBorderGroup: + description: By default when an IPv6 CIDR is assigned to a VPC + a default ipv6_cidr_block_network_border_group will be set to + the region of the VPC. This can be changed to restrict advertisement + of public addresses to specific Network Border Groups such as + LocalZones. + type: string + ipv6IpamPoolId: + description: IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + type: string + ipv6NetmaskLength: + description: 'Netmask length to request from IPAM Pool. Conflicts + with ipv6_cidr_block. This can be omitted if IPAM pool as a + allocation_default_netmask_length set. Valid values: 56.' + type: number + region: + description: Region is the region you'd like your resource to + be created in. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + assignGeneratedIpv6CidrBlock: + description: Requests an Amazon-provided IPv6 CIDR block with + a /56 prefix length for the VPC. You cannot specify the range + of IP addresses, or the size of the CIDR block. Default is false. + Conflicts with ipv6_ipam_pool_id + type: boolean + cidrBlock: + description: The IPv4 CIDR block for the VPC. CIDR can be explicitly + set or it can be derived from IPAM using ipv4_netmask_length. + type: string + enableDnsHostnames: + description: A boolean flag to enable/disable DNS hostnames in + the VPC. Defaults false. + type: boolean + enableDnsSupport: + description: A boolean flag to enable/disable DNS support in the + VPC. Defaults to true. + type: boolean + enableNetworkAddressUsageMetrics: + description: Indicates whether Network Address Usage metrics are + enabled for your VPC. Defaults to false. + type: boolean + instanceTenancy: + description: A tenancy option for instances launched into the + VPC. Default is default, which ensures that EC2 instances launched + in this VPC use the EC2 instance tenancy attribute specified + when the EC2 instance is launched. The only other option is + dedicated, which ensures that EC2 instances launched in this + VPC are run on dedicated tenancy instances regardless of the + tenancy attribute specified at launch. This has a dedicated + per region fee of $2 per hour, plus an hourly per instance usage + fee. + type: string + ipv4IpamPoolId: + description: The ID of an IPv4 IPAM pool you want to use for allocating + this VPC's CIDR. IPAM is a VPC feature that you can use to automate + your IP address management workflows including assigning, tracking, + troubleshooting, and auditing IP addresses across AWS Regions + and accounts. Using IPAM you can monitor IP address usage throughout + your AWS Organization. + type: string + ipv4NetmaskLength: + description: The netmask length of the IPv4 CIDR you want to allocate + to this VPC. Requires specifying a ipv4_ipam_pool_id. + type: number + ipv6CidrBlock: + description: IPv6 CIDR block to request from an IPAM Pool. Can + be set explicitly or derived from IPAM using ipv6_netmask_length. + type: string + ipv6CidrBlockNetworkBorderGroup: + description: By default when an IPv6 CIDR is assigned to a VPC + a default ipv6_cidr_block_network_border_group will be set to + the region of the VPC. This can be changed to restrict advertisement + of public addresses to specific Network Border Groups such as + LocalZones. + type: string + ipv6IpamPoolId: + description: IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + type: string + ipv6NetmaskLength: + description: 'Netmask length to request from IPAM Pool. Conflicts + with ipv6_cidr_block. This can be omitted if IPAM pool as a + allocation_default_netmask_length set. Valid values: 56.' + type: number + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + status: + description: VPCStatus defines the observed state of VPC. + properties: + atProvider: + properties: + arn: + description: Amazon Resource Name (ARN) of VPC + type: string + assignGeneratedIpv6CidrBlock: + description: Requests an Amazon-provided IPv6 CIDR block with + a /56 prefix length for the VPC. You cannot specify the range + of IP addresses, or the size of the CIDR block. Default is false. + Conflicts with ipv6_ipam_pool_id + type: boolean + cidrBlock: + description: The IPv4 CIDR block for the VPC. CIDR can be explicitly + set or it can be derived from IPAM using ipv4_netmask_length. + type: string + defaultNetworkAclId: + description: The ID of the network ACL created by default on VPC + creation + type: string + defaultRouteTableId: + description: The ID of the route table created by default on VPC + creation + type: string + defaultSecurityGroupId: + description: The ID of the security group created by default on + VPC creation + type: string + dhcpOptionsId: + description: The ID of the VPC + type: string + enableDnsHostnames: + description: A boolean flag to enable/disable DNS hostnames in + the VPC. Defaults false. + type: boolean + enableDnsSupport: + description: A boolean flag to enable/disable DNS support in the + VPC. Defaults to true. + type: boolean + enableNetworkAddressUsageMetrics: + description: Indicates whether Network Address Usage metrics are + enabled for your VPC. Defaults to false. + type: boolean + id: + description: The ID of the VPC + type: string + instanceTenancy: + description: A tenancy option for instances launched into the + VPC. Default is default, which ensures that EC2 instances launched + in this VPC use the EC2 instance tenancy attribute specified + when the EC2 instance is launched. The only other option is + dedicated, which ensures that EC2 instances launched in this + VPC are run on dedicated tenancy instances regardless of the + tenancy attribute specified at launch. This has a dedicated + per region fee of $2 per hour, plus an hourly per instance usage + fee. + type: string + ipv4IpamPoolId: + description: The ID of an IPv4 IPAM pool you want to use for allocating + this VPC's CIDR. IPAM is a VPC feature that you can use to automate + your IP address management workflows including assigning, tracking, + troubleshooting, and auditing IP addresses across AWS Regions + and accounts. Using IPAM you can monitor IP address usage throughout + your AWS Organization. + type: string + ipv4NetmaskLength: + description: The netmask length of the IPv4 CIDR you want to allocate + to this VPC. Requires specifying a ipv4_ipam_pool_id. + type: number + ipv6AssociationId: + description: The association ID for the IPv6 CIDR block. + type: string + ipv6CidrBlock: + description: IPv6 CIDR block to request from an IPAM Pool. Can + be set explicitly or derived from IPAM using ipv6_netmask_length. + type: string + ipv6CidrBlockNetworkBorderGroup: + description: By default when an IPv6 CIDR is assigned to a VPC + a default ipv6_cidr_block_network_border_group will be set to + the region of the VPC. This can be changed to restrict advertisement + of public addresses to specific Network Border Groups such as + LocalZones. + type: string + ipv6IpamPoolId: + description: IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block. + type: string + ipv6NetmaskLength: + description: 'Netmask length to request from IPAM Pool. Conflicts + with ipv6_cidr_block. This can be omitted if IPAM pool as a + allocation_default_netmask_length set. Valid values: 56.' + type: number + mainRouteTableId: + description: The ID of the main route table associated with this + VPC. Note that you can change a VPC's main route table by using + an aws_main_route_table_association. + type: string + ownerId: + description: The ID of the AWS account that owns the VPC. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/elasticache.aws.kubedb.com_clusters.yaml b/package/crds/elasticache.aws.kubedb.com_clusters.yaml index 3d29b06..62eb5ec 100644 --- a/package/crds/elasticache.aws.kubedb.com_clusters.yaml +++ b/package/crds/elasticache.aws.kubedb.com_clusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusters.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -138,11 +137,6 @@ spec: description: Valid values are slow-log or engine-log. Max 1 of each. type: string - required: - - destination - - destinationType - - logFormat - - logType type: object type: array maintenanceWindow: @@ -285,6 +279,158 @@ spec: otherwise, the cluster is a standalone primary that is not part of any replication group. type: string + replicationGroupIdRef: + description: Reference to a ReplicationGroup in elasticache to + populate replicationGroupId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + replicationGroupIdSelector: + description: Selector for a ReplicationGroup in elasticache to + populate replicationGroupId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + securityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object securityGroupIds: description: – One or more VPC security groups associated with the cache cluster @@ -320,6 +466,81 @@ spec: subnetGroupName: description: create the resource. type: string + subnetGroupNameRef: + description: Reference to a SubnetGroup in elasticache to populate + subnetGroupName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + subnetGroupNameSelector: + description: Selector for a SubnetGroup in elasticache to populate + subnetGroupName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object tags: additionalProperties: type: string @@ -334,21 +555,205 @@ spec: inherited from the provider default_tags configuration block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applyImmediately: + description: Whether any database modifications are applied immediately, + or during the next maintenance window. Default is false. See + Amazon ElastiCache Documentation for more information.. + type: boolean + autoMinorVersionUpgrade: + description: Specifies whether minor version engine upgrades will + be applied automatically to the underlying Cache Cluster instances + during the maintenance window. Only supported for engine type + "redis" and if the engine version is 6 or higher. Defaults to + true. + type: string + availabilityZone: + description: 'Availability Zone for the cache cluster. If you + want to create cache nodes in multi-az, use preferred_availability_zones + instead. Default: System chosen Availability Zone. Changing + this value will re-create the resource.' + type: string + azMode: + description: Whether the nodes in this Memcached node group are + created in a single Availability Zone or created across multiple + Availability Zones in the cluster's region. Valid values for + this parameter are single-az or cross-az, default is single-az. + If you want to choose cross-az, num_cache_nodes must be greater + than 1. + type: string + engine: + description: – Name of the cache engine to be used for this cache + cluster. Valid values are memcached or redis. + type: string + engineVersion: + description: – Version number of the cache engine to be used. + If not set, defaults to the latest version. See Describe Cache + Engine Versions in the AWS Documentation for supported versions. + When engine is redis and the version is 6 or higher, the major + and minor version can be set, e.g., 6.2, or the minor version + can be unspecified which will use the latest version at creation + time, e.g., 6.x. Otherwise, specify the full version desired, + e.g., 5.0.6. The actual engine version used is returned in the + attribute engine_version_actual, see Attributes Reference below. + type: string + finalSnapshotIdentifier: + description: Name of your final cluster snapshot. If omitted, + no final snapshot will be made. + type: string + ipDiscovery: + description: The IP version to advertise in the discovery protocol. + Valid values are ipv4 or ipv6. + type: string + logDeliveryConfiguration: + description: Specifies the destination and format of Redis SLOWLOG + or Redis Engine Log. See the documentation on Amazon ElastiCache. + See Log Delivery Configuration below for more details. + items: + properties: + destination: + description: Name of either the CloudWatch Logs LogGroup + or Kinesis Data Firehose resource. + type: string + destinationType: + description: For CloudWatch Logs use cloudwatch-logs or + for Kinesis Data Firehose use kinesis-firehose. + type: string + logFormat: + description: Valid values are json or text + type: string + logType: + description: Valid values are slow-log or engine-log. Max + 1 of each. + type: string + type: object + type: array + maintenanceWindow: + description: 'ddd:hh24:mi (24H Clock UTC). The minimum maintenance + window is a 60 minute period. Example: sun:05:00-sun:09:00.' + type: string + networkType: + description: The IP versions for cache cluster connections. IPv6 + is supported with Redis engine 6.2 onword or Memcached version + 1.6.6 for all Nitro system instances. Valid values are ipv4, + ipv6 or dual_stack. + type: string + nodeType: + description: create the resource. + type: string + notificationTopicArn: + description: east-1:012345678999:my_sns_topic. + type: string + numCacheNodes: + description: – The initial number of cache nodes that the cache + cluster will have. For Redis, this value must be 1. For Memcached, + this value must be between 1 and 40. If this number is reduced + on subsequent runs, the highest numbered nodes will be removed. + type: number + outpostMode: + description: Specify the outpost mode that will apply to the cache + cluster creation. Valid values are "single-outpost" and "cross-outpost", + however AWS currently only supports "single-outpost" mode. + type: string + port: + description: create the resource. + type: number + preferredAvailabilityZones: + description: 'List of the Availability Zones in which cache nodes + are created. If you are creating your cluster in an Amazon VPC + you can only locate nodes in Availability Zones that are associated + with the subnets in the selected subnet group. The number of + Availability Zones listed must equal the value of num_cache_nodes. + If you want all the nodes in the same Availability Zone, use + availability_zone instead, or repeat the Availability Zone multiple + times in the list. Default: System chosen Availability Zones. + Detecting drift of existing node availability zone is not currently + supported. Updating this argument by itself to migrate existing + node availability zones is not currently supported and will + show a perpetual difference.' + items: + type: string + type: array + preferredOutpostArn: + description: The outpost ARN in which the cache cluster will be + created. + type: string + snapshotArns: + description: element string list containing an Amazon Resource + Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. + The object name cannot contain any commas. Changing snapshot_arns + forces a new resource. + items: + type: string + type: array + snapshotName: + description: Name of a snapshot from which to restore data into + the new node group. Changing snapshot_name forces a new resource. + type: string + snapshotRetentionLimit: + description: Number of days for which ElastiCache will retain + automatic cache cluster snapshots before deleting them. For + example, if you set SnapshotRetentionLimit to 5, then a snapshot + that was taken today will be retained for 5 days before being + deleted. If the value of SnapshotRetentionLimit is set to zero + (0), backups are turned off. Please note that setting a snapshot_retention_limit + is not supported on cache.t1.micro cache nodes + type: number + snapshotWindow: + description: 'Daily time range (in UTC) during which ElastiCache + will begin taking a daily snapshot of your cache cluster. Example: + 05:00-09:00' + type: string + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -387,42 +792,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -521,8 +890,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterStatus defines the observed state of Cluster. properties: @@ -784,6 +1154,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticache.aws.kubedb.com_parametergroups.yaml b/package/crds/elasticache.aws.kubedb.com_parametergroups.yaml index c957e65..422db74 100644 --- a/package/crds/elasticache.aws.kubedb.com_parametergroups.yaml +++ b/package/crds/elasticache.aws.kubedb.com_parametergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: parametergroups.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -87,9 +86,6 @@ spec: value: description: The value of the ElastiCache parameter. type: string - required: - - name - - value type: object type: array region: @@ -111,21 +107,79 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the ElastiCache parameter group. + type: string + family: + description: The family of the ElastiCache parameter group. + type: string + name: + description: The name of the ElastiCache parameter group. + type: string + parameter: + description: A list of ElastiCache parameters to apply. + items: + properties: + name: + description: The name of the ElastiCache parameter group. + type: string + value: + description: The value of the ElastiCache parameter. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: Key-value mapping of resource tags. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -164,42 +218,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -298,12 +316,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: family is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family) - - message: name is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.family is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.family) + || (has(self.initProvider) && has(self.initProvider.family))' + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ParameterGroupStatus defines the observed state of ParameterGroup. properties: @@ -384,6 +407,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticache.aws.kubedb.com_replicationgroups.yaml b/package/crds/elasticache.aws.kubedb.com_replicationgroups.yaml index 0cb6d4b..2a26ad2 100644 --- a/package/crds/elasticache.aws.kubedb.com_replicationgroups.yaml +++ b/package/crds/elasticache.aws.kubedb.com_replicationgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: replicationgroups.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -242,11 +241,6 @@ spec: description: Valid values are slow-log or engine-log. Max 1 of each. type: string - required: - - destination - - destinationType - - logFormat - - logType type: object type: array maintenanceWindow: @@ -304,6 +298,83 @@ spec: this number will trigger a resizing operation before other settings modifications. Valid values are 0 to 5. type: number + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + securityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object securityGroupIds: description: One or more Amazon VPC security groups associated with this replication group. Use this parameter only when you @@ -451,21 +522,236 @@ spec: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applyImmediately: + description: Specifies whether any modifications are applied immediately, + or during the next maintenance window. Default is false. + type: boolean + atRestEncryptionEnabled: + description: Whether to enable encryption at rest. + type: boolean + autoMinorVersionUpgrade: + description: Specifies whether minor version engine upgrades will + be applied automatically to the underlying Cache Cluster instances + during the maintenance window. Only supported for engine type + "redis" and if the engine version is 6 or higher. Defaults to + true. + type: string + automaticFailoverEnabled: + description: Specifies whether a read-only replica will be automatically + promoted to read/write primary if the existing primary fails. + If enabled, num_cache_clusters must be greater than 1. Must + be enabled for Redis (cluster mode enabled) replication groups. + Defaults to false. + type: boolean + dataTieringEnabled: + description: Enables data tiering. Data tiering is only supported + for replication groups using the r6gd node type. This parameter + must be set to true when using r6gd nodes. + type: boolean + description: + description: created description for the replication group. Must + not be empty. + type: string + engine: + description: Name of the cache engine to be used for the clusters + in this replication group. The only valid value is redis. + type: string + engineVersion: + description: Version number of the cache engine to be used for + the cache clusters in this replication group. If the version + is 6 or higher, the major and minor version can be set, e.g., + 6.2, or the minor version can be unspecified which will use + the latest version at creation time, e.g., 6.x. Otherwise, specify + the full version desired, e.g., 5.0.6. The actual engine version + used is returned in the attribute engine_version_actual, see + Attributes Reference below. + type: string + finalSnapshotIdentifier: + description: The name of your final node group (shard) snapshot. + ElastiCache creates the snapshot from the primary node in the + cluster. If omitted, no final snapshot will be made. + type: string + globalReplicationGroupId: + description: The ID of the global replication group to which this + replication group should belong. If this parameter is specified, + the replication group is added to the specified global replication + group as a secondary replication group; otherwise, the replication + group is not part of any global replication group. If global_replication_group_id + is set, the num_node_groups parameter cannot be set. + type: string + logDeliveryConfiguration: + description: Specifies the destination and format of Redis SLOWLOG + or Redis Engine Log. See the documentation on Amazon ElastiCache. + See Log Delivery Configuration below for more details. + items: + properties: + destination: + description: Name of either the CloudWatch Logs LogGroup + or Kinesis Data Firehose resource. + type: string + destinationType: + description: For CloudWatch Logs use cloudwatch-logs or + for Kinesis Data Firehose use kinesis-firehose. + type: string + logFormat: + description: Valid values are json or text + type: string + logType: + description: Valid values are slow-log or engine-log. Max + 1 of each. + type: string + type: object + type: array + maintenanceWindow: + description: 'ddd:hh24:mi (24H Clock UTC). The minimum maintenance + window is a 60 minute period. Example: sun:05:00-sun:09:00' + type: string + multiAzEnabled: + description: Specifies whether to enable Multi-AZ Support for + the replication group. If true, automatic_failover_enabled must + also be enabled. Defaults to false. + type: boolean + nodeType: + description: Instance class to be used. See AWS documentation + for information on supported node types and guidance on selecting + node types. Required unless global_replication_group_id is set. + Cannot be set if global_replication_group_id is set. + type: string + notificationTopicArn: + description: east-1:012345678999:my_sns_topic + type: string + numCacheClusters: + description: 00#. + type: number + numNodeGroups: + description: Number of node groups (shards) for this Redis replication + group. Changing this number will trigger a resizing operation + before other settings modifications. + type: number + parameterGroupName: + description: Name of the parameter group to associate with this + replication group. If this argument is omitted, the default + cache parameter group for the specified engine is used. To enable + "cluster mode", i.e., data sharding, use a parameter group that + has the parameter cluster-enabled set to true. + type: string + port: + description: – Port number on which each of the cache nodes will + accept connections. For Memcache the default is 11211, and for + Redis the default port is 6379. + type: number + preferredCacheClusterAzs: + description: List of EC2 availability zones in which the replication + group's cache clusters will be created. The order of the availability + zones in the list is considered. The first item in the list + will be the primary node. Ignored when updating. + items: + type: string + type: array + replicasPerNodeGroup: + description: Number of replica nodes in each node group. Changing + this number will trigger a resizing operation before other settings + modifications. Valid values are 0 to 5. + type: number + securityGroupNames: + description: List of cache security group names to associate with + this replication group. + items: + type: string + type: array + snapshotArns: + description: – List of ARNs that identify Redis RDB snapshot + files stored in Amazon S3. The names object names cannot contain + any commas. + items: + type: string + type: array + snapshotName: + description: Name of a snapshot from which to restore data into + the new node group. Changing the snapshot_name forces a new + resource. + type: string + snapshotRetentionLimit: + description: Number of days for which ElastiCache will retain + automatic cache cluster snapshots before deleting them. For + example, if you set SnapshotRetentionLimit to 5, then a snapshot + that was taken today will be retained for 5 days before being + deleted. If the value of snapshot_retention_limit is set to + zero (0), backups are turned off. Please note that setting a + snapshot_retention_limit is not supported on cache.t1.micro + cache nodes + type: number + snapshotWindow: + description: 'Daily time range (in UTC) during which ElastiCache + will begin taking a daily snapshot of your cache cluster. The + minimum snapshot window is a 60 minute period. Example: 05:00-09:00' + type: string + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. Adding tags + to this resource will add or overwrite any existing tags on + the clusters in the replication group and not to the group itself. + If configured with a provider default_tags configuration block + present, tags with matching keys will overwrite those defined + at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + transitEncryptionEnabled: + description: Whether to enable encryption in transit. + type: boolean + userGroupIds: + description: 'User Group ID to associate with the replication + group. Only a maximum of one (1) user group ID is valid. NOTE: + This argument is a set because the AWS specification allows + for multiple IDs. However, in practice, AWS only allows a maximum + size of one.' + items: + type: string + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -504,42 +790,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -638,8 +888,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ReplicationGroupStatus defines the observed state of ReplicationGroup. properties: @@ -920,6 +1171,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticache.aws.kubedb.com_subnetgroups.yaml b/package/crds/elasticache.aws.kubedb.com_subnetgroups.yaml index f0c3841..43def26 100644 --- a/package/crds/elasticache.aws.kubedb.com_subnetgroups.yaml +++ b/package/crds/elasticache.aws.kubedb.com_subnetgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: subnetgroups.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -75,6 +74,83 @@ spec: description: Region is the region you'd like your resource to be created in. type: string + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subnetIds: description: – List of VPC Subnet IDs for the cache subnet group items: @@ -95,21 +171,61 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: – Description for the cache subnet group. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -148,42 +264,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -282,10 +362,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: subnetIds is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SubnetGroupStatus defines the observed state of SubnetGroup. properties: @@ -351,6 +430,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticache.aws.kubedb.com_usergroups.yaml b/package/crds/elasticache.aws.kubedb.com_usergroups.yaml index 5592d13..ad247af 100644 --- a/package/crds/elasticache.aws.kubedb.com_usergroups.yaml +++ b/package/crds/elasticache.aws.kubedb.com_usergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: usergroups.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -171,21 +170,61 @@ spec: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + engine: + description: The current supported value is REDIS. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -224,42 +263,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -358,10 +361,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: engine is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.engine is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engine) + || (has(self.initProvider) && has(self.initProvider.engine))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: UserGroupStatus defines the observed state of UserGroup. properties: @@ -429,6 +435,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticache.aws.kubedb.com_users.yaml b/package/crds/elasticache.aws.kubedb.com_users.yaml index 7bbcfdc..793c80a 100644 --- a/package/crds/elasticache.aws.kubedb.com_users.yaml +++ b/package/crds/elasticache.aws.kubedb.com_users.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: users.elasticache.aws.kubedb.com spec: group: elasticache.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -103,8 +102,6 @@ spec: description: 'Specifies the authentication type. Possible options are: password, no-password-required or iam.' type: string - required: - - type type: object type: array engine: @@ -153,21 +150,78 @@ spec: description: The username of the user. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + accessString: + description: Access permissions string used for this user. See + Specifying Permissions Using an Access String for more details. + type: string + authenticationMode: + description: Denotes the user's authentication properties. Detailed + below. + items: + properties: + type: + description: 'Specifies the authentication type. Possible + options are: password, no-password-required or iam.' + type: string + type: object + type: array + engine: + description: The current supported value is REDIS. + type: string + noPasswordRequired: + description: Indicates a password is not required for this user. + type: boolean + tags: + additionalProperties: + type: string + description: A list of tags to be added to this resource. A tag + is a key-value pair. + type: object + tagsAll: + additionalProperties: + type: string + type: object + userName: + description: The username of the user. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -206,42 +260,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -340,14 +358,21 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: accessString is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.accessString) - - message: engine is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: userName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.userName) + - message: spec.forProvider.accessString is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.accessString) + || (has(self.initProvider) && has(self.initProvider.accessString))' + - message: spec.forProvider.engine is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engine) + || (has(self.initProvider) && has(self.initProvider.engine))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.userName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.userName) + || (has(self.initProvider) && has(self.initProvider.userName))' status: description: UserStatus defines the observed state of User. properties: @@ -428,6 +453,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticsearch.aws.kubedb.com_domainpolicies.yaml b/package/crds/elasticsearch.aws.kubedb.com_domainpolicies.yaml index f37aa64..3a19292 100644 --- a/package/crds/elasticsearch.aws.kubedb.com_domainpolicies.yaml +++ b/package/crds/elasticsearch.aws.kubedb.com_domainpolicies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: domainpolicies.elasticsearch.aws.kubedb.com spec: group: elasticsearch.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -75,26 +74,128 @@ spec: domainName: description: Name of the domain. type: string + domainNameRef: + description: Reference to a Domain in elasticsearch to populate + domainName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + domainNameSelector: + description: Selector for a Domain in elasticsearch to populate + domainName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + accessPolicies: + description: IAM policy document specifying the access policies + for the domain + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -133,42 +234,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -267,12 +332,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: accessPolicies is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.accessPolicies) - - message: domainName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.domainName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.accessPolicies is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.accessPolicies) + || (has(self.initProvider) && has(self.initProvider.accessPolicies))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: DomainPolicyStatus defines the observed state of DomainPolicy. properties: @@ -321,6 +387,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticsearch.aws.kubedb.com_domains.yaml b/package/crds/elasticsearch.aws.kubedb.com_domains.yaml index 1a34ca8..3a3be59 100644 --- a/package/crds/elasticsearch.aws.kubedb.com_domains.yaml +++ b/package/crds/elasticsearch.aws.kubedb.com_domains.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: domains.elasticsearch.aws.kubedb.com spec: group: elasticsearch.aws.kubedb.com @@ -57,7 +56,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -127,8 +126,6 @@ spec: type: object type: object type: array - required: - - enabled type: object type: array autoTuneOptions: @@ -165,19 +162,12 @@ spec: of the duration of an Auto-Tune maintenance window. type: number - required: - - unit - - value type: object type: array startAt: description: Date and time at which to start the Auto-Tune maintenance schedule in RFC3339 format. type: string - required: - - cronExpressionForRecurrence - - duration - - startAt type: object type: array rollbackOnDisable: @@ -185,8 +175,6 @@ spec: settings when disabling Auto-Tune. Valid values: DEFAULT_ROLLBACK or NO_ROLLBACK.' type: string - required: - - desiredState type: object type: array clusterConfig: @@ -277,10 +265,6 @@ spec: userPoolId: description: ID of the Cognito User Pool to use. type: string - required: - - identityPoolId - - roleArn - - userPoolId type: object type: array domainEndpointOptions: @@ -335,8 +319,6 @@ spec: volumeType: description: Type of EBS volumes attached to data nodes. type: string - required: - - ebsEnabled type: object type: array elasticsearchVersion: @@ -359,8 +341,6 @@ spec: service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. type: string - required: - - enabled type: object type: array logPublishingOptions: @@ -382,9 +362,6 @@ spec: description: 'Type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS, AUDIT_LOGS.' type: string - required: - - cloudwatchLogGroupArn - - logType type: object type: array nodeToNodeEncryption: @@ -399,8 +376,6 @@ spec: of a new domain requires an elasticsearch_version of 6.0 or greater. type: boolean - required: - - enabled type: object type: array region: @@ -419,8 +394,6 @@ spec: description: Hour during which the service takes an automated daily snapshot of the indices in the domain. type: number - required: - - automatedSnapshotStartHour type: object type: array tags: @@ -458,21 +431,384 @@ spec: type: object type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + accessPolicies: + description: IAM policy document specifying the access policies + for the domain. + type: string + advancedOptions: + additionalProperties: + type: string + description: Key-value string pairs to specify advanced configuration + options. + type: object + advancedSecurityOptions: + description: Configuration block for fine-grained access control. + Detailed below. + items: + properties: + enabled: + description: Whether advanced security is enabled. + type: boolean + internalUserDatabaseEnabled: + description: Whether the internal user database is enabled. + If not set, defaults to false by the AWS API. + type: boolean + masterUserOptions: + description: Configuration block for the main user. Detailed + below. + items: + properties: + masterUserArn: + description: ARN for the main user. Only specify if + internal_user_database_enabled is not set or set + to false. + type: string + masterUserName: + description: Main user's username, which is stored + in the Amazon Elasticsearch Service domain's internal + database. Only specify if internal_user_database_enabled + is set to true. + type: string + type: object + type: array + type: object + type: array + autoTuneOptions: + description: Configuration block for the Auto-Tune options of + the domain. Detailed below. + items: + properties: + desiredState: + description: 'The Auto-Tune desired state for the domain. + Valid values: ENABLED or DISABLED.' + type: string + maintenanceSchedule: + description: Configuration block for Auto-Tune maintenance + windows. Can be specified multiple times for each maintenance + window. Detailed below. + items: + properties: + cronExpressionForRecurrence: + description: A cron expression specifying the recurrence + pattern for an Auto-Tune maintenance schedule. + type: string + duration: + description: Configuration block for the duration + of the Auto-Tune maintenance window. Detailed below. + items: + properties: + unit: + description: 'The unit of time specifying the + duration of an Auto-Tune maintenance window. + Valid values: HOURS.' + type: string + value: + description: An integer specifying the value + of the duration of an Auto-Tune maintenance + window. + type: number + type: object + type: array + startAt: + description: Date and time at which to start the Auto-Tune + maintenance schedule in RFC3339 format. + type: string + type: object + type: array + rollbackOnDisable: + description: 'Whether to roll back to default Auto-Tune + settings when disabling Auto-Tune. Valid values: DEFAULT_ROLLBACK + or NO_ROLLBACK.' + type: string + type: object + type: array + clusterConfig: + description: Configuration block for the cluster of the domain. + Detailed below. + items: + properties: + coldStorageOptions: + description: Configuration block containing cold storage + configuration. Detailed below. + items: + properties: + enabled: + description: Boolean to enable cold storage for an + Elasticsearch domain. Defaults to false. Master + and ultrawarm nodes must be enabled for cold storage. + type: boolean + type: object + type: array + dedicatedMasterCount: + description: Number of dedicated main nodes in the cluster. + type: number + dedicatedMasterEnabled: + description: Whether dedicated main nodes are enabled for + the cluster. + type: boolean + dedicatedMasterType: + description: Instance type of the dedicated main nodes in + the cluster. + type: string + instanceCount: + description: Number of instances in the cluster. + type: number + instanceType: + description: Instance type of data nodes in the cluster. + type: string + warmCount: + description: Number of warm nodes in the cluster. Valid + values are between 2 and 150. warm_count can be only and + must be set when warm_enabled is set to true. + type: number + warmEnabled: + description: Whether to enable warm storage. + type: boolean + warmType: + description: Instance type for the Elasticsearch cluster's + warm nodes. Valid values are ultrawarm1.medium.elasticsearch, + ultrawarm1.large.elasticsearch and ultrawarm1.xlarge.elasticsearch. + warm_type can be only and must be set when warm_enabled + is set to true. + type: string + zoneAwarenessConfig: + description: Configuration block containing zone awareness + settings. Detailed below. + items: + properties: + availabilityZoneCount: + description: 'Number of Availability Zones for the + domain to use with zone_awareness_enabled. Defaults + to 2. Valid values: 2 or 3.' + type: number + type: object + type: array + zoneAwarenessEnabled: + description: Whether zone awareness is enabled, set to true + for multi-az deployment. To enable awareness with three + Availability Zones, the availability_zone_count within + the zone_awareness_config must be set to 3. + type: boolean + type: object + type: array + cognitoOptions: + description: Configuration block for authenticating Kibana with + Cognito. Detailed below. + items: + properties: + enabled: + description: Whether Amazon Cognito authentication with + Kibana is enabled or not. + type: boolean + identityPoolId: + description: ID of the Cognito Identity Pool to use. + type: string + roleArn: + description: ARN of the IAM role that has the AmazonESCognitoAccess + policy attached. + type: string + userPoolId: + description: ID of the Cognito User Pool to use. + type: string + type: object + type: array + domainEndpointOptions: + description: Configuration block for domain endpoint HTTP(S) related + options. Detailed below. + items: + properties: + customEndpoint: + description: Fully qualified domain for your custom endpoint. + type: string + customEndpointCertificateArn: + description: ACM certificate ARN for your custom endpoint. + type: string + customEndpointEnabled: + description: Whether to enable custom endpoint for the Elasticsearch + domain. + type: boolean + enforceHttps: + description: Whether or not to require HTTPS. Defaults to + true. + type: boolean + tlsSecurityPolicy: + description: 'Name of the TLS security policy that needs + to be applied to the HTTPS endpoint. Valid values: Policy-Min-TLS-1-0-2019-07 + and Policy-Min-TLS-1-2-2019-07.' + type: string + type: object + type: array + ebsOptions: + description: Configuration block for EBS related options, may + be required based on chosen instance size. Detailed below. + items: + properties: + ebsEnabled: + description: Whether EBS volumes are attached to data nodes + in the domain. + type: boolean + iops: + description: Baseline input/output (I/O) performance of + EBS volumes attached to data nodes. Applicable only for + the GP3 and Provisioned IOPS EBS volume types. + type: number + throughput: + description: Specifies the throughput (in MiB/s) of the + EBS volumes attached to data nodes. Applicable only for + the gp3 volume type. + type: number + volumeSize: + description: Size of EBS volumes attached to data nodes + (in GiB). + type: number + volumeType: + description: Type of EBS volumes attached to data nodes. + type: string + type: object + type: array + elasticsearchVersion: + description: Version of Elasticsearch to deploy. Defaults to 1.5. + type: string + encryptAtRest: + description: Configuration block for encrypt at rest options. + Only available for certain instance types. Detailed below. + items: + properties: + enabled: + description: Whether to enable encryption at rest. If the + encrypt_at_rest block is not provided then this defaults + to false. Enabling encryption on new domains requires + elasticsearch_version 5.1 or greater. + type: boolean + kmsKeyId: + description: KMS key ARN to encrypt the Elasticsearch domain + with. If not specified then it defaults to using the aws/es + service KMS key. Note that KMS will accept a KMS key ID + but will return the key ARN. + type: string + type: object + type: array + logPublishingOptions: + description: Configuration block for publishing slow and application + logs to CloudWatch Logs. This block can be declared multiple + times, for each log_type, within the same resource. Detailed + below. + items: + properties: + cloudwatchLogGroupArn: + description: ARN of the Cloudwatch log group to which log + needs to be published. + type: string + enabled: + description: Whether given log publishing option is enabled + or not. + type: boolean + logType: + description: 'Type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, + SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS, AUDIT_LOGS.' + type: string + type: object + type: array + nodeToNodeEncryption: + description: Configuration block for node-to-node encryption options. + Detailed below. + items: + properties: + enabled: + description: Whether to enable node-to-node encryption. + If the node_to_node_encryption block is not provided then + this defaults to false. Enabling node-to-node encryption + of a new domain requires an elasticsearch_version of 6.0 + or greater. + type: boolean + type: object + type: array + snapshotOptions: + description: Configuration block for snapshot related options. + Detailed below. DEPRECATED. For domains running Elasticsearch + 5.3 and later, Amazon ES takes hourly automated snapshots, making + this setting irrelevant. For domains running earlier versions + of Elasticsearch, Amazon ES takes daily automated snapshots. + items: + properties: + automatedSnapshotStartHour: + description: Hour during which the service takes an automated + daily snapshot of the indices in the domain. + type: number + type: object + type: array + tags: + additionalProperties: + type: string + description: Map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + vpcOptions: + description: Configuration block for VPC related options. Adding + or removing this configuration forces a new resource (documentation). + Detailed below. + items: + properties: + securityGroupIds: + description: List of VPC Security Group IDs to be applied + to the Elasticsearch domain endpoints. If omitted, the + default Security Group for the VPC will be used. + items: + type: string + type: array + subnetIds: + description: List of VPC Subnet IDs for the Elasticsearch + domain endpoints to be created in. + items: + type: string + type: array + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -511,42 +847,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -645,8 +945,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: DomainStatus defines the observed state of Domain. properties: @@ -1053,6 +1354,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/elasticsearch.aws.kubedb.com_domainsamloptions.yaml b/package/crds/elasticsearch.aws.kubedb.com_domainsamloptions.yaml index f21005b..123f8d1 100644 --- a/package/crds/elasticsearch.aws.kubedb.com_domainsamloptions.yaml +++ b/package/crds/elasticsearch.aws.kubedb.com_domainsamloptions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: domainsamloptions.elasticsearch.aws.kubedb.com spec: group: elasticsearch.aws.kubedb.com @@ -57,7 +56,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -91,9 +90,6 @@ spec: description: The Metadata of the SAML application in xml format. type: string - required: - - entityId - - metadataContent type: object type: array masterBackendRole: @@ -137,21 +133,87 @@ spec: type: object type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + samlOptions: + description: The SAML authentication options for an AWS Elasticsearch + Domain. + items: + properties: + enabled: + description: Whether SAML authentication is enabled. + type: boolean + idp: + description: Information from your identity provider. + items: + properties: + entityId: + description: The unique Entity ID of the application + in SAML Identity Provider. + type: string + metadataContent: + description: The Metadata of the SAML application + in xml format. + type: string + type: object + type: array + masterBackendRole: + description: This backend role from the SAML IdP receives + full permissions to the cluster, equivalent to a new master + user. + type: string + rolesKey: + description: Element of the SAML assertion to use for backend + roles. Default is roles. + type: string + sessionTimeoutMinutes: + description: Duration of a session in minutes after a user + logs in. Default is 60. Maximum value is 1,440. + type: number + subjectKey: + description: Custom SAML attribute to use for user names. + Default is an empty string - "". This will cause Elasticsearch + to use the NameID element of the Subject, which is the + default location for name identifiers in the SAML specification. + type: string + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -190,42 +252,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -324,8 +350,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: DomainSAMLOptionsStatus defines the observed state of DomainSAMLOptions. properties: @@ -412,6 +439,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/iam.aws.kubedb.com_roles.yaml b/package/crds/iam.aws.kubedb.com_roles.yaml new file mode 100644 index 0000000..a961544 --- /dev/null +++ b/package/crds/iam.aws.kubedb.com_roles.yaml @@ -0,0 +1,523 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: roles.iam.aws.kubedb.com +spec: + group: iam.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: Role + listKind: RoleList + plural: roles + singular: role + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Role is the Schema for the Roles API. Provides an IAM role. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: RoleSpec defines the desired state of Role + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + assumeRolePolicy: + description: Policy that grants an entity permission to assume + the role. + type: string + description: + description: Description of the role. + type: string + forceDetachPolicies: + description: Whether to force detaching any policies the role + has before destroying it. Defaults to false. + type: boolean + inlinePolicy: + description: Configuration block defining an exclusive set of + IAM inline policies associated with the IAM role. See below. + If no blocks are configured, Crossplane will not manage any + inline policies in this resource. Configuring one empty block + (i.e., inline_policy {}) will cause Crossplane to remove all + inline policies added out of band on apply. + items: + properties: + name: + description: Friendly name of the role. See IAM Identifiers + for more information. + type: string + policy: + description: Policy document as a JSON formatted string. + type: string + type: object + type: array + managedPolicyArns: + description: Set of exclusive IAM managed policy ARNs to attach + to the IAM role. If this attribute is not configured, Crossplane + will ignore policy attachments to this resource. When configured, + Crossplane will align the role's managed policy attachments + with this set by attaching or detaching managed policies. Configuring + an empty set (i.e., managed_policy_arns = []) will cause Crossplane + to remove all managed policy attachments. + items: + type: string + type: array + maxSessionDuration: + description: Maximum session duration (in seconds) that you want + to set for the specified role. If you do not specify a value + for this setting, the default maximum of one hour is applied. + This setting can have a value from 1 hour to 12 hours. + type: number + path: + description: Path to the role. See IAM Identifiers for more information. + type: string + permissionsBoundary: + description: ARN of the policy that is used to set the permissions + boundary for the role. + type: string + tags: + additionalProperties: + type: string + description: Key-value mapping of tags for the IAM role. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + assumeRolePolicy: + description: Policy that grants an entity permission to assume + the role. + type: string + description: + description: Description of the role. + type: string + forceDetachPolicies: + description: Whether to force detaching any policies the role + has before destroying it. Defaults to false. + type: boolean + inlinePolicy: + description: Configuration block defining an exclusive set of + IAM inline policies associated with the IAM role. See below. + If no blocks are configured, Crossplane will not manage any + inline policies in this resource. Configuring one empty block + (i.e., inline_policy {}) will cause Crossplane to remove all + inline policies added out of band on apply. + items: + properties: + name: + description: Friendly name of the role. See IAM Identifiers + for more information. + type: string + policy: + description: Policy document as a JSON formatted string. + type: string + type: object + type: array + managedPolicyArns: + description: Set of exclusive IAM managed policy ARNs to attach + to the IAM role. If this attribute is not configured, Crossplane + will ignore policy attachments to this resource. When configured, + Crossplane will align the role's managed policy attachments + with this set by attaching or detaching managed policies. Configuring + an empty set (i.e., managed_policy_arns = []) will cause Crossplane + to remove all managed policy attachments. + items: + type: string + type: array + maxSessionDuration: + description: Maximum session duration (in seconds) that you want + to set for the specified role. If you do not specify a value + for this setting, the default maximum of one hour is applied. + This setting can have a value from 1 hour to 12 hours. + type: number + path: + description: Path to the role. See IAM Identifiers for more information. + type: string + permissionsBoundary: + description: ARN of the policy that is used to set the permissions + boundary for the role. + type: string + tags: + additionalProperties: + type: string + description: Key-value mapping of tags for the IAM role. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.assumeRolePolicy is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.assumeRolePolicy) + || (has(self.initProvider) && has(self.initProvider.assumeRolePolicy))' + status: + description: RoleStatus defines the observed state of Role. + properties: + atProvider: + properties: + arn: + description: Amazon Resource Name (ARN) specifying the role. + type: string + assumeRolePolicy: + description: Policy that grants an entity permission to assume + the role. + type: string + createDate: + description: Creation date of the IAM role. + type: string + description: + description: Description of the role. + type: string + forceDetachPolicies: + description: Whether to force detaching any policies the role + has before destroying it. Defaults to false. + type: boolean + id: + description: Name of the role. + type: string + inlinePolicy: + description: Configuration block defining an exclusive set of + IAM inline policies associated with the IAM role. See below. + If no blocks are configured, Crossplane will not manage any + inline policies in this resource. Configuring one empty block + (i.e., inline_policy {}) will cause Crossplane to remove all + inline policies added out of band on apply. + items: + properties: + name: + description: Friendly name of the role. See IAM Identifiers + for more information. + type: string + policy: + description: Policy document as a JSON formatted string. + type: string + type: object + type: array + managedPolicyArns: + description: Set of exclusive IAM managed policy ARNs to attach + to the IAM role. If this attribute is not configured, Crossplane + will ignore policy attachments to this resource. When configured, + Crossplane will align the role's managed policy attachments + with this set by attaching or detaching managed policies. Configuring + an empty set (i.e., managed_policy_arns = []) will cause Crossplane + to remove all managed policy attachments. + items: + type: string + type: array + maxSessionDuration: + description: Maximum session duration (in seconds) that you want + to set for the specified role. If you do not specify a value + for this setting, the default maximum of one hour is applied. + This setting can have a value from 1 hour to 12 hours. + type: number + path: + description: Path to the role. See IAM Identifiers for more information. + type: string + permissionsBoundary: + description: ARN of the policy that is used to set the permissions + boundary for the role. + type: string + roleLastUsed: + description: Contains information about the last time that an + IAM role was used. See role_last_used for details. + items: + properties: + lastUsedDate: + type: string + region: + description: The name of the AWS Region in which the role + was last used. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: Key-value mapping of tags for the IAM role. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + uniqueId: + description: Stable and unique string identifying the role. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/kafka.aws.kubedb.com_clusters.yaml b/package/crds/kafka.aws.kubedb.com_clusters.yaml index e5a560d..f9e60eb 100644 --- a/package/crds/kafka.aws.kubedb.com_clusters.yaml +++ b/package/crds/kafka.aws.kubedb.com_clusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusters.kafka.aws.kubedb.com spec: group: kafka.aws.kubedb.com @@ -57,7 +56,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -322,8 +321,6 @@ spec: type: array type: object type: array - required: - - instanceType type: object type: array clientAuthentication: @@ -380,9 +377,6 @@ spec: description: Revision of the MSK Configuration to use in the cluster. type: number - required: - - arn - - revision type: object type: array encryptionInfo: @@ -516,92 +510,6 @@ spec: description: Name of the Cloudwatch Log Group to deliver logs to. type: string - logGroupRef: - description: Reference to a Group in cloudwatchlogs - to populate logGroup. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether - resolution of this reference is required. - The default is 'Required', which means - the reconcile will fail if the reference - cannot be resolved. 'Optional' means - this reference will be a no-op if - it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when - this reference should be resolved. - The default is 'IfNotPresent', which - will attempt to resolve the reference - only when the corresponding field - is not present. Use 'Always' to resolve - the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - logGroupSelector: - description: Selector for a Group in cloudwatchlogs - to populate logGroup. - properties: - matchControllerRef: - description: MatchControllerRef ensures - an object with the same controller reference - as the selecting object is selected. - type: boolean - matchLabels: - additionalProperties: - type: string - description: MatchLabels ensures an object - with matching labels is selected. - type: object - policy: - description: Policies for selection. - properties: - resolution: - default: Required - description: Resolution specifies whether - resolution of this reference is required. - The default is 'Required', which means - the reconcile will fail if the reference - cannot be resolved. 'Optional' means - this reference will be a no-op if - it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when - this reference should be resolved. - The default is 'IfNotPresent', which - will attempt to resolve the reference - only when the corresponding field - is not present. Use 'Always' to resolve - the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - type: object - required: - - enabled type: object type: array firehose: @@ -615,8 +523,6 @@ spec: description: 'Controls whether provisioned throughput is enabled or not. Default value: false.' type: boolean - required: - - enabled type: object type: array s3: @@ -626,90 +532,6 @@ spec: description: Name of the S3 bucket to deliver logs to. type: string - bucketRef: - description: Reference to a Bucket in s3 to - populate bucket. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether - resolution of this reference is required. - The default is 'Required', which means - the reconcile will fail if the reference - cannot be resolved. 'Optional' means - this reference will be a no-op if - it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when - this reference should be resolved. - The default is 'IfNotPresent', which - will attempt to resolve the reference - only when the corresponding field - is not present. Use 'Always' to resolve - the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - bucketSelector: - description: Selector for a Bucket in s3 to - populate bucket. - properties: - matchControllerRef: - description: MatchControllerRef ensures - an object with the same controller reference - as the selecting object is selected. - type: boolean - matchLabels: - additionalProperties: - type: string - description: MatchLabels ensures an object - with matching labels is selected. - type: object - policy: - description: Policies for selection. - properties: - resolution: - default: Required - description: Resolution specifies whether - resolution of this reference is required. - The default is 'Required', which means - the reconcile will fail if the reference - cannot be resolved. 'Optional' means - this reference will be a no-op if - it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when - this reference should be resolved. - The default is 'IfNotPresent', which - will attempt to resolve the reference - only when the corresponding field - is not present. Use 'Always' to resolve - the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - type: object enabled: description: 'Controls whether provisioned throughput is enabled or not. Default value: false.' @@ -718,14 +540,10 @@ spec: description: Prefix to append to the folder name. type: string - required: - - enabled type: object type: array type: object type: array - required: - - brokerLogs type: object type: array numberOfBrokerNodes: @@ -752,8 +570,6 @@ spec: description: Indicates whether you want to enable or disable the JMX Exporter. type: boolean - required: - - enabledInBroker type: object type: array nodeExporter: @@ -765,14 +581,10 @@ spec: description: Indicates whether you want to enable or disable the JMX Exporter. type: boolean - required: - - enabledInBroker type: object type: array type: object type: array - required: - - prometheus type: object type: array region: @@ -798,21 +610,327 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + brokerNodeGroupInfo: + description: Configuration block for the broker nodes of the Kafka + cluster. + items: + properties: + azDistribution: + description: The distribution of broker nodes across availability + zones (documentation). Currently the only valid value + is DEFAULT. + type: string + connectivityInfo: + description: Information about the cluster access configuration. + See below. For security reasons, you can't turn on public + access while creating an MSK cluster. However, you can + update an existing cluster to make it publicly accessible. + You can also create a new cluster and then update it to + make it publicly accessible (documentation). + items: + properties: + publicAccess: + description: Access control settings for brokers. + See below. + items: + properties: + type: + description: 'Public access type. Valida values: + DISABLED, SERVICE_PROVIDED_EIPS.' + type: string + type: object + type: array + type: object + type: array + instanceType: + description: Specify the instance type to use for the kafka + brokersE.g., kafka.m5.large. (Pricing info) + type: string + storageInfo: + description: A block that contains information about storage + volumes attached to MSK broker nodes. See below. + items: + properties: + ebsStorageInfo: + description: A block that contains EBS volume information. + See below. + items: + properties: + provisionedThroughput: + description: A block that contains EBS volume + provisioned throughput information. To provision + storage throughput, you must choose broker + type kafka.m5.4xlarge or larger. See below. + items: + properties: + enabled: + description: 'Controls whether provisioned + throughput is enabled or not. Default + value: false.' + type: boolean + volumeThroughput: + description: Throughput value of the EBS + volumes for the data drive on each kafka + broker node in MiB per second. The minimum + value is 250. The maximum value varies + between broker type. You can refer to + the valid values for the maximum volume + throughput at the following documentation + on throughput bottlenecks + type: number + type: object + type: array + volumeSize: + description: The size in GiB of the EBS volume + for the data drive on each broker node. Minimum + value of 1 and maximum value of 16384. + type: number + type: object + type: array + type: object + type: array + type: object + type: array + clientAuthentication: + description: Configuration block for specifying a client authentication. + See below. + items: + properties: + sasl: + description: Configuration block for specifying SASL client + authentication. See below. + items: + properties: + iam: + description: Enables IAM client authentication. Defaults + to false. + type: boolean + scram: + description: Enables SCRAM client authentication via + AWS Secrets Manager. Defaults to false. + type: boolean + type: object + type: array + tls: + description: Configuration block for specifying TLS client + authentication. See below. + items: + properties: + certificateAuthorityArns: + description: List of ACM Certificate Authority Amazon + Resource Names (ARNs). + items: + type: string + type: array + type: object + type: array + unauthenticated: + description: Enables unauthenticated access. + type: boolean + type: object + type: array + clusterName: + description: Name of the MSK cluster. + type: string + configurationInfo: + description: Configuration block for specifying a MSK Configuration + to attach to Kafka brokers. See below. + items: + properties: + arn: + description: Amazon Resource Name (ARN) of the MSK Configuration + to use in the cluster. + type: string + revision: + description: Revision of the MSK Configuration to use in + the cluster. + type: number + type: object + type: array + encryptionInfo: + description: Configuration block for specifying encryption. See + below. + items: + properties: + encryptionInTransit: + description: Configuration block to specify encryption in + transit. See below. + items: + properties: + clientBroker: + description: 'Encryption setting for data in transit + between clients and brokers. Valid values: TLS, + TLS_PLAINTEXT, and PLAINTEXT. Default value is TLS.' + type: string + inCluster: + description: 'Whether data communication among broker + nodes is encrypted. Default value: true.' + type: boolean + type: object + type: array + type: object + type: array + enhancedMonitoring: + description: Specify the desired enhanced MSK CloudWatch monitoring + level. See Monitoring Amazon MSK with Amazon CloudWatch + type: string + kafkaVersion: + description: Specify the desired Kafka software version. + type: string + loggingInfo: + description: Configuration block for streaming broker logs to + Cloudwatch/S3/Kinesis Firehose. See below. + items: + properties: + brokerLogs: + description: Configuration block for Broker Logs settings + for logging info. See below. + items: + properties: + cloudwatchLogs: + items: + properties: + enabled: + description: 'Controls whether provisioned throughput + is enabled or not. Default value: false.' + type: boolean + logGroup: + description: Name of the Cloudwatch Log Group + to deliver logs to. + type: string + type: object + type: array + firehose: + items: + properties: + deliveryStream: + description: Name of the Kinesis Data Firehose + delivery stream to deliver logs to. + type: string + enabled: + description: 'Controls whether provisioned throughput + is enabled or not. Default value: false.' + type: boolean + type: object + type: array + s3: + items: + properties: + bucket: + description: Name of the S3 bucket to deliver + logs to. + type: string + enabled: + description: 'Controls whether provisioned throughput + is enabled or not. Default value: false.' + type: boolean + prefix: + description: Prefix to append to the folder + name. + type: string + type: object + type: array + type: object + type: array + type: object + type: array + numberOfBrokerNodes: + description: The desired total number of broker nodes in the kafka + cluster. It must be a multiple of the number of specified client + subnets. + type: number + openMonitoring: + description: Configuration block for JMX and Node monitoring for + the MSK cluster. See below. + items: + properties: + prometheus: + description: Configuration block for Prometheus settings + for open monitoring. See below. + items: + properties: + jmxExporter: + description: Configuration block for JMX Exporter. + See below. + items: + properties: + enabledInBroker: + description: Indicates whether you want to enable + or disable the JMX Exporter. + type: boolean + type: object + type: array + nodeExporter: + description: Configuration block for Node Exporter. + See below. + items: + properties: + enabledInBroker: + description: Indicates whether you want to enable + or disable the JMX Exporter. + type: boolean + type: object + type: array + type: object + type: array + type: object + type: array + storageMode: + description: 'Controls storage mode for supported storage tiers. + Valid values are: LOCAL or TIERED.' + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -851,42 +969,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -985,16 +1067,25 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: brokerNodeGroupInfo is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.brokerNodeGroupInfo) - - message: clusterName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterName) - - message: kafkaVersion is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.kafkaVersion) - - message: numberOfBrokerNodes is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.numberOfBrokerNodes) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.brokerNodeGroupInfo is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.brokerNodeGroupInfo) + || (has(self.initProvider) && has(self.initProvider.brokerNodeGroupInfo))' + - message: spec.forProvider.clusterName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.clusterName) + || (has(self.initProvider) && has(self.initProvider.clusterName))' + - message: spec.forProvider.kafkaVersion is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.kafkaVersion) + || (has(self.initProvider) && has(self.initProvider.kafkaVersion))' + - message: spec.forProvider.numberOfBrokerNodes is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.numberOfBrokerNodes) + || (has(self.initProvider) && has(self.initProvider.numberOfBrokerNodes))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterStatus defines the observed state of Cluster. properties: @@ -1424,6 +1515,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/kafka.aws.kubedb.com_configurations.yaml b/package/crds/kafka.aws.kubedb.com_configurations.yaml index f55375c..76a3c68 100644 --- a/package/crds/kafka.aws.kubedb.com_configurations.yaml +++ b/package/crds/kafka.aws.kubedb.com_configurations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: configurations.kafka.aws.kubedb.com spec: group: kafka.aws.kubedb.com @@ -35,9 +34,8 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: Configuration is the Schema for the Configurations API. Upbound - official provider resource for managing an amazon managed streaming for - kafka configuration + description: Configuration is the Schema for the Configurations API. provider + resource for managing an amazon managed streaming for kafka configuration properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -59,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -90,21 +88,60 @@ spec: properties are documented in the MSK Developer Guide. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: Description of the configuration. + type: string + kafkaVersions: + description: List of Apache Kafka versions which can use this + configuration. + items: + type: string + type: array + name: + description: Name of the configuration. + type: string + serverProperties: + description: Contents of the server.properties file. Supported + properties are documented in the MSK Developer Guide. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -143,42 +180,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -277,12 +278,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: serverProperties is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.serverProperties) + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.serverProperties is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.serverProperties) + || (has(self.initProvider) && has(self.initProvider.serverProperties))' status: description: ConfigurationStatus defines the observed state of Configuration. properties: @@ -346,6 +352,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/kinesis.aws.kubedb.com_streams.yaml b/package/crds/kinesis.aws.kubedb.com_streams.yaml index 82ddf8c..8db7751 100644 --- a/package/crds/kinesis.aws.kubedb.com_streams.yaml +++ b/package/crds/kinesis.aws.kubedb.com_streams.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: streams.kinesis.aws.kubedb.com spec: group: kinesis.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -82,6 +81,79 @@ spec: for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -116,8 +188,6 @@ spec: description: Specifies the capacity mode of the stream. Must be either PROVISIONED or ON_DEMAND. type: string - required: - - streamMode type: object type: array tags: @@ -135,21 +205,99 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + encryptionType: + description: The encryption type to use. The only acceptable values + are NONE or KMS. The default value is NONE. + type: string + enforceConsumerDeletion: + description: A boolean that indicates all registered consumers + should be deregistered from the stream so that the stream can + be destroyed without error. The default value is false. + type: boolean + retentionPeriod: + description: Length of time data records are accessible after + they are added to the stream. The maximum value of a stream's + retention period is 8760 hours. Minimum value is 24. Default + is 24. + type: number + shardCount: + description: – The number of shards that the stream will use. + If the stream_mode is PROVISIONED, this field is required. Amazon + has guidelines for specifying the Stream size that should be + referenced when creating a Kinesis stream. See Amazon Kinesis + Streams for more. + type: number + shardLevelMetrics: + description: A list of shard-level CloudWatch metrics which can + be enabled for the stream. See Monitoring with CloudWatch for + more. Note that the value ALL should not be used; instead you + should provide an explicit list of metrics you wish to enable. + items: + type: string + type: array + streamModeDetails: + description: Indicates the capacity mode of the data stream. Detailed + below. + items: + properties: + streamMode: + description: Specifies the capacity mode of the stream. + Must be either PROVISIONED or ON_DEMAND. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -188,42 +336,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -322,8 +434,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: StreamStatus defines the observed state of Stream. properties: @@ -430,6 +543,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/kms.aws.kubedb.com_keys.yaml b/package/crds/kms.aws.kubedb.com_keys.yaml index 65e4cee..8680089 100644 --- a/package/crds/kms.aws.kubedb.com_keys.yaml +++ b/package/crds/kms.aws.kubedb.com_keys.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: keys.kms.aws.kubedb.com spec: group: kms.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -143,21 +142,114 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + bypassPolicyLockoutSafetyCheck: + description: A flag to indicate whether to bypass the key policy + lockout safety check. Setting this value to true increases the + risk that the KMS key becomes unmanageable. Do not set this + value to true indiscriminately. For more information, refer + to the scenario in the Default Key Policy section in the AWS + Key Management Service Developer Guide. The default value is + false. + type: boolean + customKeyStoreId: + description: ID of the KMS Custom Key Store where the key will + be stored instead of KMS (eg CloudHSM). + type: string + customerMasterKeySpec: + description: 'Specifies whether the key contains a symmetric key + or an asymmetric key pair and the encryption algorithms or signing + algorithms that the key supports. Valid values: SYMMETRIC_DEFAULT, RSA_2048, + RSA_3072, RSA_4096, HMAC_256, ECC_NIST_P256, ECC_NIST_P384, + ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT. + For help with choosing a key spec, see the AWS KMS Developer + Guide.' + type: string + deletionWindowInDays: + description: The waiting period, specified in number of days. + After the waiting period ends, AWS KMS deletes the KMS key. + If you specify a value, it must be between 7 and 30, inclusive. + If you do not specify a value, it defaults to 30. If the KMS + key is a multi-Region primary key with replicas, the waiting + period begins when the last of its replica keys is deleted. + Otherwise, the waiting period begins immediately. + type: number + description: + description: The description of the key as viewed in AWS console. + type: string + enableKeyRotation: + description: Specifies whether key rotation is enabled. Defaults + to false. + type: boolean + isEnabled: + description: Specifies whether the key is enabled. Defaults to + true. + type: boolean + keyUsage: + description: 'Specifies the intended use of the key. Valid values: + ENCRYPT_DECRYPT, SIGN_VERIFY, or GENERATE_VERIFY_MAC. Defaults + to ENCRYPT_DECRYPT.' + type: string + multiRegion: + description: Indicates whether the KMS key is a multi-Region (true) + or regional (false) key. Defaults to false. + type: boolean + policy: + description: A valid policy JSON document. Although this is a + key policy, not an IAM policy, an aws_iam_policy_document, in + the form that designates a principal, can be used. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the object. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -196,42 +288,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -330,8 +386,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: KeyStatus defines the observed state of Key. properties: @@ -449,6 +506,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/memorydb.aws.kubedb.com_acls.yaml b/package/crds/memorydb.aws.kubedb.com_acls.yaml index fa0b91d..6e6b92c 100644 --- a/package/crds/memorydb.aws.kubedb.com_acls.yaml +++ b/package/crds/memorydb.aws.kubedb.com_acls.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: acls.memorydb.aws.kubedb.com spec: group: memorydb.aws.kubedb.com @@ -57,7 +56,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -92,21 +91,64 @@ spec: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + userNames: + description: Set of MemoryDB user names to be included in this + ACL. + items: + type: string + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -145,42 +187,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -279,8 +285,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ACLStatus defines the observed state of ACL. properties: @@ -349,6 +356,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/memorydb.aws.kubedb.com_clusters.yaml b/package/crds/memorydb.aws.kubedb.com_clusters.yaml index ccd976f..03aa18b 100644 --- a/package/crds/memorydb.aws.kubedb.com_clusters.yaml +++ b/package/crds/memorydb.aws.kubedb.com_clusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusters.memorydb.aws.kubedb.com spec: group: memorydb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -97,6 +96,79 @@ spec: description: ARN of the KMS key used to encrypt the cluster at rest. type: string + kmsKeyArnRef: + description: Reference to a Key in kms to populate kmsKeyArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyArnSelector: + description: Selector for a Key in kms to populate kmsKeyArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object maintenanceWindow: description: 'Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format @@ -128,6 +200,83 @@ spec: description: Region is the region you'd like your resource to be created in. type: string + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + securityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object securityGroupIds: description: Set of VPC Security Group ID-s to associate with this cluster. @@ -163,6 +312,190 @@ spec: description: The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. type: string + subnetGroupNameRef: + description: Reference to a SubnetGroup in memorydb to populate + subnetGroupName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + subnetGroupNameSelector: + description: Selector for a SubnetGroup in memorydb to populate + subnetGroupName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + tlsEnabled: + description: A flag to enable in-transit encryption on the cluster. + When set to false, the acl_name must be open-access. Defaults + to true. + type: boolean + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + aclName: + description: The name of the Access Control List to associate + with the cluster. + type: string + autoMinorVersionUpgrade: + description: When set to true, the cluster will automatically + receive minor engine version upgrades after launch. Defaults + to true. + type: boolean + dataTiering: + description: Enables data tiering. This option is not supported + by all instance types. For more information, see Data tiering. + type: boolean + description: + description: Description for the cluster. + type: string + engineVersion: + description: Version number of the Redis engine to be used for + the cluster. Downgrades are not supported. + type: string + finalSnapshotName: + description: Name of the final cluster snapshot to be created + when this resource is deleted. If omitted, no final snapshot + will be made. + type: string + maintenanceWindow: + description: 'Specifies the weekly time range during which maintenance + on the cluster is performed. Specify as a range in the format + ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance + window is a 60 minute period. Example: sun:23:00-mon:01:30.' + type: string + nodeType: + description: The compute and memory capacity of the nodes in the + cluster. See AWS documentation on supported node types as well + as vertical scaling. + type: string + numReplicasPerShard: + description: The number of replicas to apply to each shard, up + to a maximum of 5. Defaults to 1 (i.e. 2 nodes per shard). + type: number + numShards: + description: The number of shards in the cluster. Defaults to + 1. + type: number + parameterGroupName: + description: The name of the parameter group associated with the + cluster. + type: string + port: + description: The port number on which each of the nodes accepts + connections. Defaults to 6379. + type: number + snapshotArns: + description: List of ARN-s that uniquely identify RDB snapshot + files stored in S3. The snapshot files will be used to populate + the new cluster. Object names in the ARN-s cannot contain any + commas. + items: + type: string + type: array + snapshotName: + description: The name of a snapshot from which to restore data + into the new cluster. + type: string + snapshotRetentionLimit: + description: The number of days for which MemoryDB retains automatic + snapshots before deleting them. When set to 0, automatic backups + are disabled. Defaults to 0. + type: number + snapshotWindow: + description: 'The daily time range (in UTC) during which MemoryDB + begins taking a daily snapshot of your shard. Example: 05:00-09:00.' + type: string + snsTopicArn: + description: ARN of the SNS topic to which cluster notifications + are sent. + type: string tags: additionalProperties: type: string @@ -183,21 +516,31 @@ spec: to true. type: boolean type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -236,42 +579,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -370,12 +677,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: aclName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.aclName) - - message: nodeType is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.nodeType) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.aclName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.aclName) + || (has(self.initProvider) && has(self.initProvider.aclName))' + - message: spec.forProvider.nodeType is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.nodeType) + || (has(self.initProvider) && has(self.initProvider.nodeType))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterStatus defines the observed state of Cluster. properties: @@ -593,6 +905,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/memorydb.aws.kubedb.com_parametergroups.yaml b/package/crds/memorydb.aws.kubedb.com_parametergroups.yaml index 8816ce6..5c2a5af 100644 --- a/package/crds/memorydb.aws.kubedb.com_parametergroups.yaml +++ b/package/crds/memorydb.aws.kubedb.com_parametergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: parametergroups.memorydb.aws.kubedb.com spec: group: memorydb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -87,9 +86,6 @@ spec: value: description: The value of the parameter. type: string - required: - - name - - value type: object type: array region: @@ -111,21 +107,79 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: Description for the parameter group. + type: string + family: + description: The engine version that the parameter group can be + used with. + type: string + parameter: + description: Set of MemoryDB parameters to apply. Any parameters + not specified will fall back to their family defaults. Detailed + below. + items: + properties: + name: + description: The name of the parameter. + type: string + value: + description: The value of the parameter. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -164,42 +218,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -298,10 +316,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: family is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.family is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.family) + || (has(self.initProvider) && has(self.initProvider.family))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ParameterGroupStatus defines the observed state of ParameterGroup. properties: @@ -382,6 +403,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/memorydb.aws.kubedb.com_snapshots.yaml b/package/crds/memorydb.aws.kubedb.com_snapshots.yaml index 3523f2f..b204387 100644 --- a/package/crds/memorydb.aws.kubedb.com_snapshots.yaml +++ b/package/crds/memorydb.aws.kubedb.com_snapshots.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: snapshots.memorydb.aws.kubedb.com spec: group: memorydb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -71,10 +70,156 @@ spec: clusterName: description: Name of the MemoryDB cluster to take a snapshot of. type: string + clusterNameRef: + description: Reference to a Cluster in memorydb to populate clusterName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + clusterNameSelector: + description: Selector for a Cluster in memorydb to populate clusterName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object kmsKeyArn: description: ARN of the KMS key used to encrypt the snapshot at rest. type: string + kmsKeyArnRef: + description: Reference to a Key in kms to populate kmsKeyArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyArnSelector: + description: Selector for a Key in kms to populate kmsKeyArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -94,21 +239,58 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -147,42 +329,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -281,10 +427,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: clusterName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SnapshotStatus defines the observed state of Snapshot. properties: @@ -408,6 +553,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/memorydb.aws.kubedb.com_subnetgroups.yaml b/package/crds/memorydb.aws.kubedb.com_subnetgroups.yaml index 2bcc250..43fe81e 100644 --- a/package/crds/memorydb.aws.kubedb.com_subnetgroups.yaml +++ b/package/crds/memorydb.aws.kubedb.com_subnetgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: subnetgroups.memorydb.aws.kubedb.com spec: group: memorydb.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -75,6 +74,83 @@ spec: description: Region is the region you'd like your resource to be created in. type: string + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subnetIds: description: Set of VPC Subnet ID-s for the subnet group. At least one subnet must be provided. @@ -96,21 +172,61 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: Description for the subnet group. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -149,42 +265,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -283,10 +363,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: subnetIds is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SubnetGroupStatus defines the observed state of SubnetGroup. properties: @@ -358,6 +437,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusteractivitystreams.yaml b/package/crds/rds.aws.kubedb.com_clusteractivitystreams.yaml index 2f8fb5f..2d7f4df 100644 --- a/package/crds/rds.aws.kubedb.com_clusteractivitystreams.yaml +++ b/package/crds/rds.aws.kubedb.com_clusteractivitystreams.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusteractivitystreams.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -80,6 +79,79 @@ spec: is the key ARN, key ID, alias ARN, or alias name for the KMS key. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object mode: description: 'Specifies the mode of the database activity stream. Database events such as a change or access generate an activity @@ -93,22 +165,130 @@ spec: resourceArn: description: The Amazon Resource Name (ARN) of the DB cluster. type: string + resourceArnRef: + description: Reference to a Cluster in rds to populate resourceArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + resourceArnSelector: + description: Selector for a Cluster in rds to populate resourceArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + engineNativeAuditFieldsIncluded: + description: Specifies whether the database activity stream includes + engine-native audit fields. This option only applies to an Oracle + DB instance. By default, no engine-native audit fields are included. + Defaults false. + type: boolean + mode: + description: 'Specifies the mode of the database activity stream. + Database events such as a change or access generate an activity + stream event. The database session can handle these events either + synchronously or asynchronously. One of: sync, async.' + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -147,42 +327,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -281,14 +425,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: kmsKeyId is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.kmsKeyId) - - message: mode is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.mode) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: resourceArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.resourceArn) + - message: spec.forProvider.mode is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.mode) + || (has(self.initProvider) && has(self.initProvider.mode))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterActivityStreamStatus defines the observed state of ClusterActivityStream. @@ -357,6 +500,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusterendpoints.yaml b/package/crds/rds.aws.kubedb.com_clusterendpoints.yaml index 6683c18..cf791e3 100644 --- a/package/crds/rds.aws.kubedb.com_clusterendpoints.yaml +++ b/package/crds/rds.aws.kubedb.com_clusterendpoints.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterendpoints.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -71,6 +70,79 @@ spec: clusterIdentifier: description: The cluster identifier. type: string + clusterIdentifierRef: + description: Reference to a Cluster in rds to populate clusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + clusterIdentifierSelector: + description: Selector for a Cluster in rds to populate clusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object customEndpointType: description: 'The type of the endpoint. One of: READER , ANY .' type: string @@ -107,21 +179,75 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + customEndpointType: + description: 'The type of the endpoint. One of: READER , ANY .' + type: string + excludedMembers: + description: List of DB instance identifiers that aren't part + of the custom endpoint group. All other eligible instances are + reachable through the custom endpoint. Only relevant if the + list of static members is empty. Conflicts with static_members. + items: + type: string + type: array + staticMembers: + description: List of DB instance identifiers that are part of + the custom endpoint group. Conflicts with excluded_members. + items: + type: string + type: array + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -160,42 +286,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -294,12 +384,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: clusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterIdentifier) - - message: customEndpointType is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.customEndpointType) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.customEndpointType is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.customEndpointType) + || (has(self.initProvider) && has(self.initProvider.customEndpointType))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterEndpointStatus defines the observed state of ClusterEndpoint. properties: @@ -382,6 +473,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusterinstances.yaml b/package/crds/rds.aws.kubedb.com_clusterinstances.yaml index 082d455..944f6c5 100644 --- a/package/crds/rds.aws.kubedb.com_clusterinstances.yaml +++ b/package/crds/rds.aws.kubedb.com_clusterinstances.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterinstances.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -89,6 +88,79 @@ spec: description: Identifier of the aws_rds_cluster in which to launch this instance. type: string + clusterIdentifierRef: + description: Reference to a Cluster in rds to populate clusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + clusterIdentifierSelector: + description: Selector for a Cluster in rds to populate clusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object copyTagsToSnapshot: description: defined tags from the DB instance to snapshots of the DB instance. Default false. @@ -201,6 +273,79 @@ spec: on the AWS Documentation what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances. type: string + monitoringRoleArnRef: + description: Reference to a Role in iam to populate monitoringRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + monitoringRoleArnSelector: + description: Selector for a Role in iam to populate monitoringRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object performanceInsightsEnabled: description: Specifies whether Performance Insights is enabled or not. @@ -327,21 +472,132 @@ spec: inherited from the provider default_tags configuration block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applyImmediately: + description: Specifies whether any database modifications are + applied immediately, or during the next maintenance window. + Default isfalse. + type: boolean + autoMinorVersionUpgrade: + description: Indicates that minor engine upgrades will be applied + automatically to the DB instance during the maintenance window. + Default true. + type: boolean + availabilityZone: + description: EC2 Availability Zone that the DB instance is created + in. See docs about the details. + type: string + caCertIdentifier: + description: Identifier of the CA certificate for the DB instance. + type: string + copyTagsToSnapshot: + description: defined tags from the DB instance to snapshots of + the DB instance. Default false. + type: boolean + dbParameterGroupName: + description: Name of the DB parameter group to associate with + this instance. + type: string + engine: + description: 'Name of the database engine to be used for the RDS + instance. Valid Values: aurora-mysql, aurora-postgresql, mysql, + postgres.' + type: string + engineVersion: + description: Database engine version. + type: string + instanceClass: + description: Instance class to use. For details on CPU and memory, + see Scaling Aurora DB Instances. Aurora uses db.* instance classes/types. + Please see AWS Documentation for currently available instance + classes and complete details. + type: string + monitoringInterval: + description: 'Interval, in seconds, between points when Enhanced + Monitoring metrics are collected for the DB instance. To disable + collecting Enhanced Monitoring metrics, specify 0. The default + is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60.' + type: number + performanceInsightsEnabled: + description: Specifies whether Performance Insights is enabled + or not. + type: boolean + performanceInsightsRetentionPeriod: + description: Amount of time in days to retain Performance Insights + data. Valid values are 7, 731 (2 years) or a multiple of 31. + When specifying performance_insights_retention_period, performance_insights_enabled + needs to be set to true. Defaults to '7'. + type: number + preferredBackupWindow: + description: 'Daily time range during which automated backups + are created if automated backups are enabled. Eg: "04:00-09:00". + NOTE: If preferred_backup_window is set at the cluster level, + this argument must be omitted.' + type: string + preferredMaintenanceWindow: + description: 'Window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". + Eg: "Mon:00:00-Mon:03:00".' + type: string + promotionTier: + description: Default 0. Failover Priority setting on instance + level. The reader who has lower tier has higher priority to + get promoted to writer. + type: number + publiclyAccessible: + description: Bool to control if instance is publicly accessible. + Default false. See the documentation on Creating DB Instances + for more details on controlling this property. + type: boolean + tags: + additionalProperties: + type: string + description: Map of tags to assign to the instance. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -380,42 +636,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -514,14 +734,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: clusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.clusterIdentifier) - - message: engine is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine) - - message: instanceClass is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.engine is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engine) + || (has(self.initProvider) && has(self.initProvider.engine))' + - message: spec.forProvider.instanceClass is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.instanceClass) + || (has(self.initProvider) && has(self.initProvider.instanceClass))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterInstanceStatus defines the observed state of ClusterInstance. properties: @@ -701,6 +924,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusterparametergroups.yaml b/package/crds/rds.aws.kubedb.com_clusterparametergroups.yaml index 248e166..3ff8e7a 100644 --- a/package/crds/rds.aws.kubedb.com_clusterparametergroups.yaml +++ b/package/crds/rds.aws.kubedb.com_clusterparametergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterparametergroups.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -92,9 +91,6 @@ spec: value: description: The value of the DB parameter. type: string - required: - - name - - value type: object type: array region: @@ -116,21 +112,84 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the DB cluster parameter group. + type: string + family: + description: The family of the DB cluster parameter group. + type: string + parameter: + description: A list of DB parameters to apply. Note that parameters + may differ from a family to an other. Full list of all parameters + can be discovered via aws rds describe-db-cluster-parameters + after initial creation of the group. + items: + properties: + applyMethod: + description: '"immediate" (default), or "pending-reboot". + Some engines can''t apply some parameters without a reboot, + and you will need to specify "pending-reboot" here.' + type: string + name: + description: The name of the DB cluster parameter group. + type: string + value: + description: The value of the DB parameter. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -169,42 +228,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -303,10 +326,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: family is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.family is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.family) + || (has(self.initProvider) && has(self.initProvider.family))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterParameterGroupStatus defines the observed state of ClusterParameterGroup. @@ -393,6 +419,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusterroleassociations.yaml b/package/crds/rds.aws.kubedb.com_clusterroleassociations.yaml index 47b2747..264e161 100644 --- a/package/crds/rds.aws.kubedb.com_clusterroleassociations.yaml +++ b/package/crds/rds.aws.kubedb.com_clusterroleassociations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusterroleassociations.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -71,6 +70,79 @@ spec: dbClusterIdentifier: description: DB Cluster Identifier to associate with the IAM Role. type: string + dbClusterIdentifierRef: + description: Reference to a Cluster in rds to populate dbClusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbClusterIdentifierSelector: + description: Selector for a Cluster in rds to populate dbClusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object featureName: description: Name of the feature for association. This can be found in the AWS documentation relevant to the integration or @@ -85,22 +157,124 @@ spec: description: Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster. type: string + roleArnRef: + description: Reference to a Role in iam to populate roleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + roleArnSelector: + description: Selector for a Role in iam to populate roleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + featureName: + description: Name of the feature for association. This can be + found in the AWS documentation relevant to the integration or + a full list is available in the SupportedFeatureNames list returned + by AWS CLI rds describe-db-engine-versions. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -139,42 +313,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -273,14 +411,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbClusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier) - - message: featureName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.featureName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: roleArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn) + - message: spec.forProvider.featureName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.featureName) + || (has(self.initProvider) && has(self.initProvider.featureName))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterRoleAssociationStatus defines the observed state of ClusterRoleAssociation. @@ -338,6 +475,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clusters.yaml b/package/crds/rds.aws.kubedb.com_clusters.yaml index 6a61cb9..b8c8ddf 100644 --- a/package/crds/rds.aws.kubedb.com_clusters.yaml +++ b/package/crds/rds.aws.kubedb.com_clusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clusters.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -275,6 +274,79 @@ spec: description: ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object manageMasterUserPassword: description: Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if master_password @@ -307,6 +379,79 @@ spec: the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. type: string + masterUserSecretKmsKeyIdRef: + description: Reference to a Key in kms to populate masterUserSecretKmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + masterUserSecretKmsKeyIdSelector: + description: Selector for a Key in kms to populate masterUserSecretKmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object masterUsername: description: Username for the master DB user. Please refer to the RDS Naming Constraints. This argument does not support in-place @@ -444,82 +589,6 @@ spec: bucketName: description: Bucket name where your backup is stored type: string - bucketNameRef: - description: Reference to a Bucket in s3 to populate bucketName. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference only - when the corresponding field is not present. Use - 'Always' to resolve the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - bucketNameSelector: - description: Selector for a Bucket in s3 to populate bucketName. - properties: - matchControllerRef: - description: MatchControllerRef ensures an object with - the same controller reference as the selecting object - is selected. - type: boolean - matchLabels: - additionalProperties: - type: string - description: MatchLabels ensures an object with matching - labels is selected. - type: object - policy: - description: Policies for selection. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference only - when the corresponding field is not present. Use - 'Always' to resolve the reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - type: object bucketPrefix: description: Can be blank, but is the path to your backup type: string @@ -533,10 +602,6 @@ spec: description: Version of the source engine used to make the backup type: string - required: - - ingestionRole - - sourceEngine - - sourceEngineVersion type: object type: array scalingConfiguration: @@ -602,9 +667,6 @@ spec: 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 1. type: number - required: - - maxCapacity - - minCapacity type: object type: array skipFinalSnapshot: @@ -656,70 +718,446 @@ spec: description: Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. type: object - vpcSecurityGroupIds: - description: List of VPC security groups to associate with the - Cluster + vpcSecurityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. items: - type: string + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object type: array - type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string - providerConfigRef: - default: - name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. + vpcSecurityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + vpcSecurityGroupIds. properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + vpcSecurityGroupIds: + description: List of VPC security groups to associate with the + Cluster + items: + type: string + type: array + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + allocatedStorage: + description: The amount of storage in gibibytes (GiB) to allocate + to each DB instance in the Multi-AZ DB cluster. + type: number + allowMajorVersionUpgrade: + description: Enable to allow major engine version upgrades when + changing engine versions. Defaults to false. + type: boolean + applyImmediately: + description: Specifies whether any cluster modifications are applied + immediately, or during the next maintenance window. Default + is false. See Amazon RDS Documentation for more information. + type: boolean + availabilityZones: + description: List of EC2 Availability Zones for the DB cluster + storage where DB cluster instances can be created. We recommend + specifying 3 AZs or using the if necessary. A maximum of 3 + AZs can be configured. + items: + type: string + type: array + backtrackWindow: + description: Target backtrack window, in seconds. Only available + for aurora and aurora-mysql engines currently. To disable backtracking, + set this value to 0. Defaults to 0. Must be between 0 and 259200 + (72 hours) + type: number + backupRetentionPeriod: + description: Days to retain backups for. Default 1 + type: number + clusterMembers: + description: – List of RDS Instances that are a part of this cluster + items: + type: string + type: array + copyTagsToSnapshot: + description: – Copy all Cluster tags to snapshots. Default is + false. + type: boolean + databaseName: + description: 'Name for an automatically created database on cluster + creation. There are different naming restrictions per database + engine: RDS Naming Constraints' + type: string + dbClusterInstanceClass: + description: Compute and memory capacity of each DB instance in + the Multi-AZ DB cluster, for example db.m6g.xlarge. Not all + DB instance classes are available in all AWS Regions, or for + all database engines. For the full list of DB instance classes + and availability for your engine, see DB instance class in the + Amazon RDS User Guide. (This setting is required to create a + Multi-AZ DB cluster). + type: string + dbClusterParameterGroupName: + type: string + dbInstanceParameterGroupName: + description: Instance parameter group to associate with all instances + of the DB cluster. The db_instance_parameter_group_name parameter + is only valid in combination with the allow_major_version_upgrade + parameter. + type: string + deletionProtection: + description: If the DB instance should have deletion protection + enabled. The database can't be deleted when this value is set + to true. The default is false. + type: boolean + enableGlobalWriteForwarding: + description: Whether cluster should forward writes to an associated + global cluster. Applied to secondary clusters to enable them + to forward writes to an aws_rds_global_cluster's primary cluster. + See the Aurora Userguide documentation for more information. + type: boolean + enableHttpEndpoint: + description: Enable HTTP endpoint (data API). Only valid when + engine_mode is set to serverless. + type: boolean + enabledCloudwatchLogsExports: + description: 'Set of log types to export to cloudwatch. If omitted, + no logs will be exported. The following log types are supported: + audit, error, general, slowquery, postgresql (PostgreSQL).' + items: + type: string + type: array + engine: + description: 'Name of the database engine to be used for this + DB cluster. Valid Values: aurora-mysql, aurora-postgresql, mysql, + postgres. (Note that mysql and postgres are Multi-AZ RDS clusters).' + type: string + engineMode: + description: 'Database engine mode. Valid values: global (only + valid for Aurora MySQL 1.21 and earlier), multimaster, parallelquery, + provisioned, serverless. Defaults to: provisioned. See the RDS + User Guide for limitations when using serverless.' + type: string + engineVersion: + description: Database engine version. Updating this argument results + in an outage. See the Aurora MySQL and Aurora Postgres documentation + for your configured engine to determine this value, or by running + aws rds describe-db-engine-versions. For example with Aurora + MySQL 2, a potential value for this argument is 5.7.mysql_aurora.2.03.2. + The value can contain a partial version where supported by the + API. The actual engine version used is returned in the attribute + engine_version_actual, , see Attributes Reference below. + type: string + finalSnapshotIdentifier: + description: Name of your final DB snapshot when this DB cluster + is deleted. If omitted, no final snapshot will be made. + type: string + globalClusterIdentifier: + description: Global cluster identifier specified on aws_rds_global_cluster. + type: string + iamDatabaseAuthenticationEnabled: + description: Specifies whether or not mappings of AWS Identity + and Access Management (IAM) accounts to database accounts is + enabled. Please see AWS Documentation for availability and limitations. + type: boolean + iops: + description: Amount of Provisioned IOPS (input/output operations + per second) to be initially allocated for each DB instance in + the Multi-AZ DB cluster. For information about valid Iops values, + see Amazon RDS Provisioned IOPS storage to improve performance + in the Amazon RDS User Guide. (This setting is required to create + a Multi-AZ DB cluster). Must be a multiple between .5 and 50 + of the storage amount for the DB cluster. + type: number + manageMasterUserPassword: + description: Set to true to allow RDS to manage the master user + password in Secrets Manager. Cannot be set if master_password + is provided. + type: boolean + masterUsername: + description: Username for the master DB user. Please refer to + the RDS Naming Constraints. This argument does not support in-place + updates and cannot be changed during a restore from snapshot. + type: string + networkType: + description: 'Network type of the cluster. Valid values: IPV4, + DUAL.' + type: string + port: + description: Port on which the DB accepts connections + type: number + preferredBackupWindow: + description: 'Daily time range during which automated backups + are created if automated backups are enabled using the BackupRetentionPeriod + parameter.Time in UTC. Default: A 30-minute window selected + at random from an 8-hour block of time per regionE.g., 04:00-09:00' + type: string + preferredMaintenanceWindow: + description: Weekly time range during which system maintenance + can occur, in (UTC) e.g., wed:04:00-wed:04:30 + type: string + replicationSourceIdentifier: + description: ARN of a source DB cluster or DB instance if this + DB cluster is to be created as a Read Replica. + type: string + restoreToPointInTime: + description: Nested attribute for point in time restore. More + details below. + items: + properties: + restoreToTime: + description: Date and time in UTC format to restore the + database cluster to. Conflicts with use_latest_restorable_time. + type: string + restoreType: + description: Type of restore to be performed. Valid options + are full-copy (default) and copy-on-write. + type: string + useLatestRestorableTime: + description: Set to true to restore the database cluster + to the latest restorable backup time. Defaults to false. + Conflicts with restore_to_time. + type: boolean + type: object + type: array + s3Import: + description: Port on which the DB accepts connections + items: + properties: + bucketName: + description: Bucket name where your backup is stored + type: string + bucketPrefix: + description: Can be blank, but is the path to your backup + type: string + ingestionRole: + description: Role applied to load the data. + type: string + sourceEngine: + description: Source engine for the backup + type: string + sourceEngineVersion: + description: Version of the source engine used to make the + backup + type: string + type: object + type: array + scalingConfiguration: + description: Nested attribute with scaling properties. Only valid + when engine_mode is set to serverless. More details below. + items: + properties: + autoPause: + description: Whether to enable automatic pause. A DB cluster + can be paused only when it's idle (it has no connections). + If a DB cluster is paused for more than seven days, the + DB cluster might be backed up with a snapshot. In this + case, the DB cluster is restored when there is a request + to connect to it. Defaults to true. + type: boolean + maxCapacity: + description: Maximum capacity for an Aurora DB cluster in + serverless DB engine mode. The maximum capacity must be + greater than or equal to the minimum capacity. Valid Aurora + MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, + 256. Valid Aurora PostgreSQL capacity values are (2, 4, + 8, 16, 32, 64, 192, and 384). Defaults to 16. + type: number + minCapacity: + description: Minimum capacity for an Aurora DB cluster in + serverless DB engine mode. The minimum capacity must be + lesser than or equal to the maximum capacity. Valid Aurora + MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, + 256. Valid Aurora PostgreSQL capacity values are (2, 4, + 8, 16, 32, 64, 192, and 384). Defaults to 1. + type: number + secondsUntilAutoPause: + description: Time, in seconds, before an Aurora DB cluster + in serverless mode is paused. Valid values are 300 through + 86400. Defaults to 300. + type: number + timeoutAction: + description: 'Action to take when the timeout is reached. + Valid values: ForceApplyCapacityChange, RollbackCapacityChange. + Defaults to RollbackCapacityChange. See documentation.' + type: string + type: object + type: array + serverlessv2ScalingConfiguration: + description: Nested attribute with scaling properties for ServerlessV2. + Only valid when engine_mode is set to provisioned. More details + below. + items: + properties: + maxCapacity: + description: Maximum capacity for an Aurora DB cluster in + serverless DB engine mode. The maximum capacity must be + greater than or equal to the minimum capacity. Valid Aurora + MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, + 256. Valid Aurora PostgreSQL capacity values are (2, 4, + 8, 16, 32, 64, 192, and 384). Defaults to 16. + type: number + minCapacity: + description: Minimum capacity for an Aurora DB cluster in + serverless DB engine mode. The minimum capacity must be + lesser than or equal to the maximum capacity. Valid Aurora + MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, + 256. Valid Aurora PostgreSQL capacity values are (2, 4, + 8, 16, 32, 64, 192, and 384). Defaults to 1. + type: number + type: object + type: array + skipFinalSnapshot: + description: Determines whether a final DB snapshot is created + before the DB cluster is deleted. If true is specified, no DB + snapshot is created. If false is specified, a DB snapshot is + created before the DB cluster is deleted, using the value from + final_snapshot_identifier. Default is false. + type: boolean + snapshotIdentifier: + description: Specifies whether or not to create this cluster from + a snapshot. You can use either the name or ARN when specifying + a DB cluster snapshot, or the ARN when specifying a DB snapshot. + Conflicts with global_cluster_identifier. Clusters cannot be + restored from snapshot and joined to an existing global cluster + in a single operation. See the AWS documentation or the Global + Cluster Restored From Snapshot example for instructions on building + a global cluster starting with a snapshot. + type: string + sourceRegion: + description: The source region for an encrypted replica DB cluster. + type: string + storageEncrypted: + description: Specifies whether the DB cluster is encrypted. The + default is false for provisioned engine_mode and true for serverless + engine_mode. When restoring an unencrypted snapshot_identifier, + the kms_key_id argument must be provided to encrypt the restored + cluster. + type: boolean + storageType: + description: '(Forces new for Multi-AZ DB clusters) Specifies + the storage type to be associated with the DB cluster. For Aurora + DB clusters, storage_type modifications can be done in-place. + For Multi-AZ DB Clusters, the iops argument must also be set. + Valid values are: "", aurora-iopt1 (Aurora DB Clusters); io1 + (Multi-AZ DB Clusters). Default: "" (Aurora DB Clusters); io1 + (Multi-AZ DB Clusters).' + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the DB cluster. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. type: object - required: - - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -850,10 +1288,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: engine is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engine) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.engine is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engine) + || (has(self.initProvider) && has(self.initProvider.engine))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterStatus defines the observed state of Cluster. properties: @@ -1278,6 +1719,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_clustersnapshots.yaml b/package/crds/rds.aws.kubedb.com_clustersnapshots.yaml index a8a1093..7d70428 100644 --- a/package/crds/rds.aws.kubedb.com_clustersnapshots.yaml +++ b/package/crds/rds.aws.kubedb.com_clustersnapshots.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: clustersnapshots.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -72,6 +71,79 @@ spec: description: The DB Cluster Identifier from which to take the snapshot. type: string + dbClusterIdentifierRef: + description: Reference to a Cluster in rds to populate dbClusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbClusterIdentifierSelector: + description: Selector for a Cluster in rds to populate dbClusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object dbClusterSnapshotIdentifier: description: The Identifier for the snapshot. type: string @@ -94,21 +166,61 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + dbClusterSnapshotIdentifier: + description: The Identifier for the snapshot. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the DB cluster. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -147,42 +259,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -281,12 +357,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbClusterIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterIdentifier) - - message: dbClusterSnapshotIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbClusterSnapshotIdentifier) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.dbClusterSnapshotIdentifier is a required + parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.dbClusterSnapshotIdentifier) + || (has(self.initProvider) && has(self.initProvider.dbClusterSnapshotIdentifier))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ClusterSnapshotStatus defines the observed state of ClusterSnapshot. properties: @@ -395,6 +473,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_dbinstanceautomatedbackupsreplications.yaml b/package/crds/rds.aws.kubedb.com_dbinstanceautomatedbackupsreplications.yaml index 16d3b91..c9c307e 100644 --- a/package/crds/rds.aws.kubedb.com_dbinstanceautomatedbackupsreplications.yaml +++ b/package/crds/rds.aws.kubedb.com_dbinstanceautomatedbackupsreplications.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: dbinstanceautomatedbackupsreplications.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -59,7 +58,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -75,6 +74,79 @@ spec: Name (ARN) for the KMS encryption key in the destination AWS Region, for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object preSignedUrl: description: A URL that contains a Signature Version 4 signed request for the StartDBInstanceAutomatedBackupsReplication action @@ -92,22 +164,127 @@ spec: description: The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, arn:aws:rds:us-west-2:123456789012:db:mydatabase. type: string + sourceDbInstanceArnRef: + description: Reference to a Instance in rds to populate sourceDbInstanceArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sourceDbInstanceArnSelector: + description: Selector for a Instance in rds to populate sourceDbInstanceArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + preSignedUrl: + description: A URL that contains a Signature Version 4 signed + request for the StartDBInstanceAutomatedBackupsReplication action + to be called in the AWS Region of the source DB instance. + type: string + retentionPeriod: + description: The retention period for the replicated automated + backups, defaults to 7. + type: number type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -146,42 +323,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -280,10 +421,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: sourceDbInstanceArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.sourceDbInstanceArn) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: DBInstanceAutomatedBackupsReplicationStatus defines the observed state of DBInstanceAutomatedBackupsReplication. @@ -347,6 +487,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_dbsnapshotcopies.yaml b/package/crds/rds.aws.kubedb.com_dbsnapshotcopies.yaml index fce5643..a719677 100644 --- a/package/crds/rds.aws.kubedb.com_dbsnapshotcopies.yaml +++ b/package/crds/rds.aws.kubedb.com_dbsnapshotcopies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: dbsnapshotcopies.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -77,6 +76,79 @@ spec: kmsKeyId: description: KMS key ID. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object optionGroupName: description: The name of an option group to associate with the copy of the snapshot. @@ -92,6 +164,79 @@ spec: sourceDbSnapshotIdentifier: description: Snapshot identifier of the source snapshot. type: string + sourceDbSnapshotIdentifierRef: + description: Reference to a Snapshot in rds to populate sourceDbSnapshotIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sourceDbSnapshotIdentifierSelector: + description: Selector for a Snapshot in rds to populate sourceDbSnapshotIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object tags: additionalProperties: type: string @@ -113,21 +258,78 @@ spec: description: The Identifier for the snapshot. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + copyTags: + description: Whether to copy existing tags. Defaults to false. + type: boolean + destinationRegion: + description: The Destination region to place snapshot copy. + type: string + optionGroupName: + description: The name of an option group to associate with the + copy of the snapshot. + type: string + presignedUrl: + description: he URL that contains a Signature Version 4 signed + request. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + targetCustomAvailabilityZone: + description: The external custom Availability Zone. + type: string + targetDbSnapshotIdentifier: + description: The Identifier for the snapshot. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -166,42 +368,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -300,12 +466,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: sourceDbSnapshotIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.sourceDbSnapshotIdentifier) - - message: targetDbSnapshotIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.targetDbSnapshotIdentifier) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.targetDbSnapshotIdentifier is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.targetDbSnapshotIdentifier) + || (has(self.initProvider) && has(self.initProvider.targetDbSnapshotIdentifier))' status: description: DBSnapshotCopyStatus defines the observed state of DBSnapshotCopy. properties: @@ -429,6 +596,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_eventsubscriptions.yaml b/package/crds/rds.aws.kubedb.com_eventsubscriptions.yaml index 2426bdf..086a5cf 100644 --- a/package/crds/rds.aws.kubedb.com_eventsubscriptions.yaml +++ b/package/crds/rds.aws.kubedb.com_eventsubscriptions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: eventsubscriptions.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -86,6 +85,79 @@ spec: snsTopic: description: The SNS topic to send events to. type: string + snsTopicRef: + description: Reference to a Topic in sns to populate snsTopic. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + snsTopicSelector: + description: Selector for a Topic in sns to populate snsTopic. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object sourceIds: description: A list of identifiers of the event sources for which events will be returned. If not specified, then all sources @@ -115,21 +187,83 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + enabled: + description: A boolean flag to enable/disable the subscription. + Defaults to true. + type: boolean + eventCategories: + description: A list of event categories for a SourceType that + you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html + or run aws rds describe-event-categories. + items: + type: string + type: array + sourceIds: + description: A list of identifiers of the event sources for which + events will be returned. If not specified, then all sources + are included in the response. If specified, a source_type must + also be specified. + items: + type: string + type: array + sourceType: + description: The type of source that will be generating the events. + Valid options are db-instance, db-security-group, db-parameter-group, + db-snapshot, db-cluster or db-cluster-snapshot. If not set, + all sources will be subscribed to. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -168,42 +302,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -302,10 +400,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: snsTopic is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.snsTopic) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: EventSubscriptionStatus defines the observed state of EventSubscription. properties: @@ -398,6 +495,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_globalclusters.yaml b/package/crds/rds.aws.kubedb.com_globalclusters.yaml index c276291..2789096 100644 --- a/package/crds/rds.aws.kubedb.com_globalclusters.yaml +++ b/package/crds/rds.aws.kubedb.com_globalclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: globalclusters.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -103,27 +102,155 @@ spec: description: Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. type: string + sourceDbClusterIdentifierRef: + description: Reference to a Cluster in rds to populate sourceDbClusterIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sourceDbClusterIdentifierSelector: + description: Selector for a Cluster in rds to populate sourceDbClusterIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object storageEncrypted: description: Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. type: boolean type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + databaseName: + description: Name for an automatically created database on cluster + creation. + type: string + deletionProtection: + description: If the Global Cluster should have deletion protection + enabled. The database can't be deleted when this value is set + to true. The default is false. + type: boolean + engine: + description: 'Name of the database engine to be used for this + DB cluster. Valid values: aurora, aurora-mysql, aurora-postgresql. + Defaults to aurora. Conflicts with source_db_cluster_identifier.' + type: string + engineVersion: + description: 'Engine version of the Aurora global database. The + engine, engine_version, and instance_class (on the aws_rds_cluster_instance) + must together support global databases. See Using Amazon Aurora + global databases for more information. NOTE: To avoid an inconsistent + final plan error while upgrading, use the lifecycle ignore_changes + for engine_version meta argument on the associated aws_rds_cluster + resource as shown above in Upgrading Engine Versions example.' + type: string + forceDestroy: + description: Enable to remove DB Cluster members from Global Cluster + on destroy. Required with source_db_cluster_identifier. + type: boolean + storageEncrypted: + description: Specifies whether the DB cluster is encrypted. The + default is false unless source_db_cluster_identifier is specified + and encrypted. + type: boolean + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -162,42 +289,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -296,8 +387,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: GlobalClusterStatus defines the observed state of GlobalCluster. properties: @@ -398,6 +490,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_instanceroleassociations.yaml b/package/crds/rds.aws.kubedb.com_instanceroleassociations.yaml index fb4c4d1..055e05f 100644 --- a/package/crds/rds.aws.kubedb.com_instanceroleassociations.yaml +++ b/package/crds/rds.aws.kubedb.com_instanceroleassociations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: instanceroleassociations.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -59,7 +58,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -73,6 +72,79 @@ spec: description: DB Instance Identifier to associate with the IAM Role. type: string + dbInstanceIdentifierRef: + description: Reference to a Instance in rds to populate dbInstanceIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbInstanceIdentifierSelector: + description: Selector for a Instance in rds to populate dbInstanceIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object featureName: description: Name of the feature for association. This can be found in the AWS documentation relevant to the integration or @@ -87,22 +159,124 @@ spec: description: Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance. type: string + roleArnRef: + description: Reference to a Role in iam to populate roleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + roleArnSelector: + description: Selector for a Role in iam to populate roleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + featureName: + description: Name of the feature for association. This can be + found in the AWS documentation relevant to the integration or + a full list is available in the SupportedFeatureNames list returned + by AWS CLI rds describe-db-engine-versions. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -141,42 +315,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -275,14 +413,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbInstanceIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbInstanceIdentifier) - - message: featureName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.featureName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: roleArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn) + - message: spec.forProvider.featureName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.featureName) + || (has(self.initProvider) && has(self.initProvider.featureName))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: InstanceRoleAssociationStatus defines the observed state of InstanceRoleAssociation. @@ -341,6 +478,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_instances.yaml b/package/crds/rds.aws.kubedb.com_instances.yaml index 90f2dbe..f85f16d 100644 --- a/package/crds/rds.aws.kubedb.com_instances.yaml +++ b/package/crds/rds.aws.kubedb.com_instances.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: instances.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -265,7 +264,7 @@ spec: description: The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match - the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s + the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). @@ -278,7 +277,7 @@ spec: supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must - match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s + match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'. type: string finalSnapshotIdentifier: @@ -399,6 +398,79 @@ spec: the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. type: string + masterUserSecretKmsKeyIdRef: + description: Reference to a Key in kms to populate masterUserSecretKmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + masterUserSecretKmsKeyIdSelector: + description: Selector for a Key in kms to populate masterUserSecretKmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object maxAllocatedStorage: description: When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. @@ -418,6 +490,79 @@ spec: more information on the AWS Documentation what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances. type: string + monitoringRoleArnRef: + description: Reference to a Role in iam to populate monitoringRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + monitoringRoleArnSelector: + description: Selector for a Role in iam to populate monitoringRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object multiAz: description: Specifies if the RDS instance is multi-AZ type: boolean @@ -503,6 +648,79 @@ spec: Instance Replication and Working with PostgreSQL and MySQL Read Replicas for more information on using Replication. type: string + replicateSourceDbRef: + description: Reference to a Instance in rds to populate replicateSourceDb. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + replicateSourceDbSelector: + description: Selector for a Instance in rds to populate replicateSourceDb. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object restoreToPointInTime: description: A configuration block for restoring a DB instance to an arbitrary point in time. Requires the identifier argument @@ -560,11 +778,6 @@ spec: description: Version of the source engine used to make the backup type: string - required: - - bucketName - - ingestionRole - - sourceEngine - - sourceEngineVersion type: object type: array skipFinalSnapshot: @@ -620,69 +833,464 @@ spec: description: Username for the master DB user. Cannot be specified for a replica. type: string + vpcSecurityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + vpcSecurityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + vpcSecurityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object vpcSecurityGroupIds: description: List of VPC security groups to associate. items: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string - providerConfigRef: - default: - name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. properties: - name: - description: Name of the referenced object. + allocatedStorage: + description: The allocated storage in gibibytes. If max_allocated_storage + is configured, this argument represents the initial storage + allocation and differences from the configuration will be ignored + automatically when Storage Autoscaling occurs. If replicate_source_db + is set, the value is ignored during the creation of the instance. + type: number + allowMajorVersionUpgrade: + description: Indicates that major version upgrades are allowed. + Changing this parameter does not result in an outage and the + change is asynchronously applied as soon as possible. + type: boolean + applyImmediately: + description: Specifies whether any database modifications are + applied immediately, or during the next maintenance window. + Default is false. See Amazon RDS Documentation for more information. + type: boolean + autoMinorVersionUpgrade: + description: Indicates that minor engine upgrades will be applied + automatically to the DB instance during the maintenance window. + Defaults to true. + type: boolean + availabilityZone: + description: The AZ for the RDS instance. type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string + backupRetentionPeriod: + description: The days to retain backups for. Must be between 0 + and 35. Default is 0. Must be greater than 0 if the database + is used as a source for a Read Replica, uses low-downtime updates, + or will use RDS Blue/Green deployments. + type: number + backupWindow: + description: 'The daily time range (in UTC) during which automated + backups are created if they are enabled. Example: "09:46-10:16". + Must not overlap with maintenance_window.' + type: string + blueGreenUpdate: + description: Enables low-downtime updates using RDS Blue/Green + deployments. See blue_green_update below + items: + properties: + enabled: + description: Enables [low-downtime updates](#Low-Downtime + Updates) when true. Default is false. + type: boolean + type: object + type: array + caCertIdentifier: + description: The identifier of the CA certificate for the DB instance. + type: string + characterSetName: + description: The character set name to use for DB encoding in + Oracle and Microsoft SQL instances (collation). This can't be + changed. See Oracle Character Sets Supported in Amazon RDS or + Server-Level Collation for Microsoft SQL Server for more information. + type: string + copyTagsToSnapshot: + description: – Copy all Instance tags to snapshots. Default is + false. + type: boolean + customIamInstanceProfile: + description: The instance profile associated with the underlying + Amazon EC2 instance of an RDS Custom DB instance. + type: string + customerOwnedIpEnabled: + description: Indicates whether to enable a customer-owned IP address + (CoIP) for an RDS on Outposts DB instance. See CoIP for RDS + on Outposts for more information. + type: boolean + dbName: + description: The name of the database to create when the DB instance + is created. If this parameter is not specified, no database + is created in the DB instance. Note that this does not apply + for Oracle or SQL Server engines. See the AWS documentation + for more details on what applies for those engines. If you are + providing an Oracle db name, it needs to be in all upper case. + Cannot be specified for a replica. + type: string + deleteAutomatedBackups: + description: Specifies whether to remove automated backups immediately + after the DB instance is deleted. Default is true. + type: boolean + deletionProtection: + description: If the DB instance should have deletion protection + enabled. The database can't be deleted when this value is set + to true. The default is false. + type: boolean + domain: + description: The ID of the Directory Service Active Directory + domain to create the instance in. + type: string + domainIamRoleName: + description: The name of the IAM role to be used when making API + calls to the Directory Service. + type: string + enabledCloudwatchLogsExports: + description: 'Set of log types to enable for exporting to CloudWatch + logs. If omitted, no logs will be exported. Valid values (depending + on engine). MySQL and MariaDB: audit, error, general, slowquery. + PostgreSQL: postgresql, upgrade. MSSQL: agent , error. Oracle: + alert, audit, listener, trace.' + items: + type: string + type: array + engine: + description: The database engine to use. For supported values, + see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). + Note that for Amazon Aurora instances the engine must match + the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s + engine'. For information on the difference between the available + Aurora MySQL engines see Comparison in the [Amazon RDS Release + Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). + type: string + engineVersion: + description: The engine version to use. If `autoMinorVersionUpgrade` + is enabled, you can provide a prefix of the version such as + 5.7 (for 5.7.10). The actual engine version used is returned + in the attribute `status.atProvider.engineVersionActual`. For + supported values, see the EngineVersion parameter in [API action + CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). + Note that for Amazon Aurora instances the engine version must + match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s + engine version'. + type: string + finalSnapshotIdentifier: + description: The name of your final DB snapshot when this DB instance + is deleted. Must be provided if skip_final_snapshot is set to + false. The value must begin with a letter, only contain alphanumeric + characters and hyphens, and not end with a hyphen or contain + two consecutive hyphens. Must not be provided when deleting + a read replica. + type: string + iamDatabaseAuthenticationEnabled: + description: Specifies whether mappings of AWS Identity and Access + Management (IAM) accounts to database accounts is enabled. + type: boolean + instanceClass: + description: The instance type of the RDS instance. + type: string + iops: + description: The amount of provisioned IOPS. Setting this implies + a storage_type of "io1". Can only be set when storage_type is + "io1" or "gp3". Cannot be specified for gp3 storage if the allocated_storage + value is below a per-engine threshold. See the RDS User Guide + for details. + type: number + licenseModel: + description: License model information for this DB instance. + type: string + maintenanceWindow: + description: 'The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". + Eg: "Mon:00:00-Mon:03:00". See RDS Maintenance Window docs for + more information.' + type: string + manageMasterUserPassword: + description: Set to true to allow RDS to manage the master user + password in Secrets Manager. Cannot be set if password is provided. + type: boolean + maxAllocatedStorage: + description: When configured, the upper limit to which Amazon + RDS can automatically scale the storage of the DB instance. + Configuring this will automatically ignore differences to allocated_storage. + Must be greater than or equal to allocated_storage or 0 to disable + Storage Autoscaling. + type: number + monitoringInterval: + description: 'The interval, in seconds, between points when Enhanced + Monitoring metrics are collected for the DB instance. To disable + collecting Enhanced Monitoring metrics, specify 0. The default + is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60.' + type: number + multiAz: + description: Specifies if the RDS instance is multi-AZ + type: boolean + ncharCharacterSetName: + description: The national character set is used in the NCHAR, + NVARCHAR2, and NCLOB data types for Oracle instances. This can't + be changed. See Oracle Character Sets Supported in Amazon RDS. + type: string + networkType: + description: 'The network type of the DB instance. Valid values: + IPV4, DUAL.' + type: string + optionGroupName: + description: Name of the DB option group to associate. + type: string + parameterGroupName: + description: Name of the DB parameter group to associate. + type: string + performanceInsightsEnabled: + description: Specifies whether Performance Insights are enabled. + Defaults to false. + type: boolean + performanceInsightsKmsKeyId: + description: The ARN for the KMS key to encrypt Performance Insights + data. When specifying performance_insights_kms_key_id, performance_insights_enabled + needs to be set to true. Once KMS key is set, it can never be + changed. + type: string + performanceInsightsRetentionPeriod: + description: Amount of time in days to retain Performance Insights + data. Valid values are 7, 731 (2 years) or a multiple of 31. + When specifying performance_insights_retention_period, performance_insights_enabled + needs to be set to true. Defaults to '7'. + type: number + port: + description: The port on which the DB accepts connections. + type: number + publiclyAccessible: + description: Bool to control if instance is publicly accessible. + Default is false. + type: boolean + replicaMode: + description: Specifies whether the replica is in either mounted + or open-read-only mode. This attribute is only supported by + Oracle instances. Oracle replicas operate in open-read-only + mode unless otherwise specified. See Working with Oracle Read + Replicas for more information. + type: string + restoreToPointInTime: + description: A configuration block for restoring a DB instance + to an arbitrary point in time. Requires the identifier argument + to be set with the name of the new DB instance to be created. + See Restore To Point In Time below for details. + items: + properties: + restoreTime: + description: The date and time to restore from. Value must + be a time in Universal Coordinated Time (UTC) format and + must be before the latest restorable time for the DB instance. + Cannot be specified with use_latest_restorable_time. + type: string + sourceDbInstanceAutomatedBackupsArn: + description: The ARN of the automated backup from which + to restore. Required if source_db_instance_identifier + or source_dbi_resource_id is not specified. + type: string + sourceDbInstanceIdentifier: + description: The identifier of the source DB instance from + which to restore. Must match the identifier of an existing + DB instance. Required if source_db_instance_automated_backups_arn + or source_dbi_resource_id is not specified. + type: string + sourceDbiResourceId: + description: The resource ID of the source DB instance from + which to restore. Required if source_db_instance_identifier + or source_db_instance_automated_backups_arn is not specified. + type: string + useLatestRestorableTime: + description: A boolean value that indicates whether the + DB instance is restored from the latest backup time. Defaults + to false. Cannot be specified with restore_time. + type: boolean + type: object + type: array + s3Import: + description: Restore from a Percona Xtrabackup in S3. See Importing + Data into an Amazon RDS MySQL DB Instance + items: + properties: + bucketName: + description: The bucket name where your backup is stored + type: string + bucketPrefix: + description: Can be blank, but is the path to your backup + type: string + ingestionRole: + description: Role applied to load the data. + type: string + sourceEngine: + description: Source engine for the backup + type: string + sourceEngineVersion: + description: Version of the source engine used to make the + backup + type: string + type: object + type: array + skipFinalSnapshot: + description: Determines whether a final DB snapshot is created + before the DB instance is deleted. If true is specified, no + DBSnapshot is created. If false is specified, a DB snapshot + is created before the DB instance is deleted, using the value + from final_snapshot_identifier. Default is false. + type: boolean + snapshotIdentifier: + description: 'Specifies whether or not to create this database + from a snapshot. This correlates to the snapshot ID you''d find + in the RDS console, e.g: rds:production-2015-06-26-06-05.' + type: string + storageEncrypted: + description: Specifies whether the DB instance is encrypted. Note + that if you are creating a cross-region read replica this field + is ignored and you should instead declare kms_key_id with a + valid ARN. The default is false if not specified. + type: boolean + storageThroughput: + description: The storage throughput value for the DB instance. + Can only be set when storage_type is "gp3". Cannot be specified + if the allocated_storage value is below a per-engine threshold. + See the RDS User Guide for details. + type: number + storageType: + description: One of "standard" (magnetic), "gp2" (general purpose + SSD), "gp3" (general purpose SSD that needs iops independently) + or "io1" (provisioned IOPS SSD). The default is "io1" if iops + is specified, "gp2" if not. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. type: object - required: - - name + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + timezone: + description: Time zone of the DB instance. timezone is currently + only supported by Microsoft SQL Server. The timezone can only + be set on creation. See MSSQL User Guide for more information. + type: string + username: + description: Username for the master DB user. Cannot be specified + for a replica. + type: string type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -813,10 +1421,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: instanceClass is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.instanceClass) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.instanceClass is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.instanceClass) + || (has(self.initProvider) && has(self.initProvider.instanceClass))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: InstanceStatus defines the observed state of Instance. properties: @@ -949,7 +1560,7 @@ spec: description: The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match - the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s + the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). @@ -962,7 +1573,7 @@ spec: supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must - match the [DB Cluster](https://marketplace.upbound.io/providers/upbound/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1beta1)'s + match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'. type: string engineVersionActual: @@ -1300,6 +1911,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_optiongroups.yaml b/package/crds/rds.aws.kubedb.com_optiongroups.yaml index 19d669b..8b930ac 100644 --- a/package/crds/rds.aws.kubedb.com_optiongroups.yaml +++ b/package/crds/rds.aws.kubedb.com_optiongroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: optiongroups.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -100,9 +99,6 @@ spec: value: description: The Value of the setting. type: string - required: - - name - - value type: object type: array port: @@ -118,8 +114,6 @@ spec: items: type: string type: array - required: - - optionName type: object type: array optionGroupDescription: @@ -144,21 +138,110 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + engineName: + description: Specifies the name of the engine that this option + group should be associated with. + type: string + majorEngineVersion: + description: Specifies the major version of the engine that this + option group should be associated with. + type: string + option: + description: A list of Options to apply. + items: + properties: + dbSecurityGroupMemberships: + description: A list of DB Security Groups for which the + option is enabled. + items: + type: string + type: array + optionName: + description: The Name of the Option (e.g., MEMCACHED). + type: string + optionSettings: + description: A list of option settings to apply. + items: + properties: + name: + description: The name of the option group. Must be + lowercase, to match as it is stored in AWS. + type: string + value: + description: The Value of the setting. + type: string + type: object + type: array + port: + description: The Port number when connecting to the Option + (e.g., 11211). + type: number + version: + description: The version of the option (e.g., 13.1.0.0). + type: string + vpcSecurityGroupMemberships: + description: A list of VPC Security Groups for which the + option is enabled. + items: + type: string + type: array + type: object + type: array + optionGroupDescription: + description: The description of the option group. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -197,42 +280,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -331,12 +378,17 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: engineName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engineName) - - message: majorEngineVersion is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.majorEngineVersion) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.engineName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engineName) + || (has(self.initProvider) && has(self.initProvider.engineName))' + - message: spec.forProvider.majorEngineVersion is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.majorEngineVersion) + || (has(self.initProvider) && has(self.initProvider.majorEngineVersion))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: OptionGroupStatus defines the observed state of OptionGroup. properties: @@ -448,6 +500,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_parametergroups.yaml b/package/crds/rds.aws.kubedb.com_parametergroups.yaml index 8eefb1d..e19dcc4 100644 --- a/package/crds/rds.aws.kubedb.com_parametergroups.yaml +++ b/package/crds/rds.aws.kubedb.com_parametergroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: parametergroups.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -92,9 +91,6 @@ spec: value: description: The value of the DB parameter. type: string - required: - - name - - value type: object type: array region: @@ -116,21 +112,84 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the DB parameter group. + type: string + family: + description: The family of the DB parameter group. + type: string + parameter: + description: A list of DB parameters to apply. Note that parameters + may differ from a family to an other. Full list of all parameters + can be discovered via aws rds describe-db-parameters after initial + creation of the group. + items: + properties: + applyMethod: + description: '"immediate" (default), or "pending-reboot". + Some engines can''t apply some parameters without a reboot, + and you will need to specify "pending-reboot" here.' + type: string + name: + description: The name of the DB parameter group. + type: string + value: + description: The value of the DB parameter. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -169,42 +228,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -303,10 +326,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: family is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.family) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.family is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.family) + || (has(self.initProvider) && has(self.initProvider.family))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ParameterGroupStatus defines the observed state of ParameterGroup. properties: @@ -392,6 +418,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_proxies.yaml b/package/crds/rds.aws.kubedb.com_proxies.yaml index eb43d91..60920b8 100644 --- a/package/crds/rds.aws.kubedb.com_proxies.yaml +++ b/package/crds/rds.aws.kubedb.com_proxies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: proxies.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -99,6 +98,84 @@ spec: RDS DB instance or Aurora DB cluster. These secrets are stored within Amazon Secrets Manager. type: string + secretArnRef: + description: Reference to a Secret in secretsmanager to + populate secretArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + secretArnSelector: + description: Selector for a Secret in secretsmanager to + populate secretArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object username: description: The name of the database user to which the proxy connects. @@ -142,6 +219,79 @@ spec: description: The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager. type: string + roleArnRef: + description: Reference to a Role in iam to populate roleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + roleArnSelector: + description: Selector for a Role in iam to populate roleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object tags: additionalProperties: type: string @@ -156,6 +306,83 @@ spec: those inherited from the provider default_tags configuration block. type: object + vpcSecurityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + vpcSecurityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + vpcSecurityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object vpcSecurityGroupIds: description: One or more VPC security group IDs to associate with the new proxy. @@ -169,21 +396,124 @@ spec: type: string type: array type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + auth: + description: Configuration block(s) with authorization mechanisms + to connect to the associated instances or clusters. Described + below. + items: + properties: + authScheme: + description: The type of authentication that the proxy uses + for connections from the proxy to the underlying database. + One of SECRETS. + type: string + clientPasswordAuthType: + description: The type of authentication the proxy uses for + connections from clients. Valid values are MYSQL_NATIVE_PASSWORD, + POSTGRES_SCRAM_SHA_256, POSTGRES_MD5, and SQL_SERVER_AUTHENTICATION. + type: string + description: + description: A user-specified description about the authentication + used by a proxy to log in as a specific database user. + type: string + iamAuth: + description: Whether to require or disallow AWS Identity + and Access Management (IAM) authentication for connections + to the proxy. One of DISABLED, REQUIRED. + type: string + username: + description: The name of the database user to which the + proxy connects. + type: string + type: object + type: array + debugLogging: + description: Whether the proxy includes detailed information about + SQL statements in its logs. This information helps you to debug + issues involving SQL behavior or the performance and scalability + of the proxy connections. The debug information includes the + text of SQL statements that you submit through the proxy. Thus, + only enable this setting when needed for debugging, and only + when you have security measures in place to safeguard any sensitive + information that appears in the logs. + type: boolean + engineFamily: + description: The kinds of databases that the proxy can connect + to. This value determines which database network protocol the + proxy recognizes when it interprets network traffic to and from + the database. The engine family applies to MySQL and PostgreSQL + for both RDS and Aurora. Valid values are MYSQL and POSTGRESQL. + type: string + idleClientTimeout: + description: The number of seconds that a connection to the proxy + can be inactive before the proxy disconnects it. You can set + this value higher or lower than the connection timeout limit + for the associated database. + type: number + requireTls: + description: A Boolean parameter that specifies whether Transport + Layer Security (TLS) encryption is required for connections + to the proxy. By enabling this setting, you can enforce encrypted + TLS connections to the proxy. + type: boolean + tags: + additionalProperties: + type: string + description: A mapping of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + vpcSubnetIds: + description: One or more VPC subnet IDs to associate with the + new proxy. + items: + type: string + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -222,42 +552,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -356,16 +650,21 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: auth is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.auth) - - message: engineFamily is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engineFamily) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: roleArn is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.roleArn) - - message: vpcSubnetIds is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcSubnetIds) + - message: spec.forProvider.auth is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.auth) + || (has(self.initProvider) && has(self.initProvider.auth))' + - message: spec.forProvider.engineFamily is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.engineFamily) + || (has(self.initProvider) && has(self.initProvider.engineFamily))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.vpcSubnetIds is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.vpcSubnetIds) + || (has(self.initProvider) && has(self.initProvider.vpcSubnetIds))' status: description: ProxyStatus defines the observed state of Proxy. properties: @@ -512,6 +811,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_proxydefaulttargetgroups.yaml b/package/crds/rds.aws.kubedb.com_proxydefaulttargetgroups.yaml index 8640b6c..30275fa 100644 --- a/package/crds/rds.aws.kubedb.com_proxydefaulttargetgroups.yaml +++ b/package/crds/rds.aws.kubedb.com_proxydefaulttargetgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: proxydefaulttargetgroups.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -59,7 +58,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -124,26 +123,174 @@ spec: dbProxyName: description: Name of the RDS DB Proxy. type: string + dbProxyNameRef: + description: Reference to a Proxy in rds to populate dbProxyName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbProxyNameSelector: + description: Selector for a Proxy in rds to populate dbProxyName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + connectionPoolConfig: + description: The settings that determine the size and behavior + of the connection pool for the target group. + items: + properties: + connectionBorrowTimeout: + description: The number of seconds for a proxy to wait for + a connection to become available in the connection pool. + Only applies when the proxy has opened its maximum number + of connections and all connections are busy with client + sessions. + type: number + initQuery: + description: One or more SQL statements for the proxy to + run when opening each new database connection. Typically + used with SET statements to make sure that each connection + has identical settings such as time zone and character + set. This setting is empty by default. For multiple statements, + use semicolons as the separator. You can also include + multiple variables in a single SET statement, such as + SET x=1, y=2. + type: string + maxConnectionsPercent: + description: The maximum size of the connection pool for + each target in a target group. For Aurora MySQL, it is + expressed as a percentage of the max_connections setting + for the RDS DB instance or Aurora DB cluster used by the + target group. + type: number + maxIdleConnectionsPercent: + description: Controls how actively the proxy closes idle + database connections in the connection pool. A high value + enables the proxy to leave a high percentage of idle connections + open. A low value causes the proxy to close idle client + connections and return the underlying database connections + to the connection pool. For Aurora MySQL, it is expressed + as a percentage of the max_connections setting for the + RDS DB instance or Aurora DB cluster used by the target + group. + type: number + sessionPinningFilters: + description: Each item in the list represents a class of + SQL operations that normally cause all later statements + in a session using a proxy to be pinned to the same underlying + database connection. Including an item in the list exempts + that class of SQL operations from the pinning behavior. + Currently, the only allowed value is EXCLUDE_VARIABLE_SETS. + items: + type: string + type: array + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -182,42 +329,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -316,10 +427,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbProxyName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbProxyName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: ProxyDefaultTargetGroupStatus defines the observed state of ProxyDefaultTargetGroup. @@ -425,6 +535,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_proxyendpoints.yaml b/package/crds/rds.aws.kubedb.com_proxyendpoints.yaml index c3e3cf0..144af9b 100644 --- a/package/crds/rds.aws.kubedb.com_proxyendpoints.yaml +++ b/package/crds/rds.aws.kubedb.com_proxyendpoints.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: proxyendpoints.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -72,6 +71,79 @@ spec: description: The name of the DB proxy associated with the DB proxy endpoint that you create. type: string + dbProxyNameRef: + description: Reference to a Proxy in rds to populate dbProxyName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbProxyNameSelector: + description: Selector for a Proxy in rds to populate dbProxyName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -90,6 +162,83 @@ spec: for read/write or read-only operations. The default is READ_WRITE. Valid values are READ_WRITE and READ_ONLY. type: string + vpcSecurityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate vpcSecurityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + vpcSecurityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to populate + vpcSecurityGroupIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object vpcSecurityGroupIds: description: One or more VPC security group IDs to associate with the new proxy. @@ -102,24 +251,65 @@ spec: items: type: string type: array - required: - - dbProxyName type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + tags: + additionalProperties: + type: string + description: A mapping of tags to assign to the resource. + type: object + tagsAll: + additionalProperties: + type: string + type: object + targetRole: + description: Indicates whether the DB proxy endpoint can be used + for read/write or read-only operations. The default is READ_WRITE. + Valid values are READ_WRITE and READ_ONLY. + type: string + vpcSubnetIds: + description: One or more VPC subnet IDs to associate with the + new proxy. + items: + type: string + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -158,42 +348,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -292,10 +446,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: vpcSubnetIds is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.vpcSubnetIds) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.vpcSubnetIds is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.vpcSubnetIds) + || (has(self.initProvider) && has(self.initProvider.vpcSubnetIds))' status: description: ProxyEndpointStatus defines the observed state of ProxyEndpoint. properties: @@ -384,6 +541,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_proxytargets.yaml b/package/crds/rds.aws.kubedb.com_proxytargets.yaml index bfcb0a9..6cbf721 100644 --- a/package/crds/rds.aws.kubedb.com_proxytargets.yaml +++ b/package/crds/rds.aws.kubedb.com_proxytargets.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: proxytargets.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -74,9 +73,155 @@ spec: dbInstanceIdentifier: description: DB instance identifier. type: string + dbInstanceIdentifierRef: + description: Reference to a Instance in rds to populate dbInstanceIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbInstanceIdentifierSelector: + description: Selector for a Instance in rds to populate dbInstanceIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object dbProxyName: description: The name of the DB proxy. type: string + dbProxyNameRef: + description: Reference to a Proxy in rds to populate dbProxyName. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbProxyNameSelector: + description: Selector for a Proxy in rds to populate dbProxyName. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -85,21 +230,50 @@ spec: description: The name of the target group. type: string type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + dbClusterIdentifier: + description: DB cluster identifier. + type: string + targetGroupName: + description: The name of the target group. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -138,42 +312,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -272,12 +410,13 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbProxyName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbProxyName) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: targetGroupName is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.targetGroupName) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + - message: spec.forProvider.targetGroupName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.targetGroupName) + || (has(self.initProvider) && has(self.initProvider.targetGroupName))' status: description: ProxyTargetStatus defines the observed state of ProxyTarget. properties: @@ -358,6 +497,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_snapshots.yaml b/package/crds/rds.aws.kubedb.com_snapshots.yaml index 32a8987..1f3d046 100644 --- a/package/crds/rds.aws.kubedb.com_snapshots.yaml +++ b/package/crds/rds.aws.kubedb.com_snapshots.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: snapshots.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -72,6 +71,79 @@ spec: description: The DB Instance Identifier from which to take the snapshot. type: string + dbInstanceIdentifierRef: + description: Reference to a Instance in rds to populate dbInstanceIdentifier. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + dbInstanceIdentifierSelector: + description: Selector for a Instance in rds to populate dbInstanceIdentifier. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object region: description: Region is the region you'd like your resource to be created in. @@ -97,21 +169,64 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + sharedAccounts: + description: List of AWS Account ids to share snapshot with, use + all to make snaphot public. + items: + type: string + type: array + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -150,42 +265,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -284,10 +363,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dbInstanceIdentifier is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.dbInstanceIdentifier) - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SnapshotStatus defines the observed state of Snapshot. properties: @@ -408,6 +486,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/rds.aws.kubedb.com_subnetgroups.yaml b/package/crds/rds.aws.kubedb.com_subnetgroups.yaml index f6abc67..91bbc0f 100644 --- a/package/crds/rds.aws.kubedb.com_subnetgroups.yaml +++ b/package/crds/rds.aws.kubedb.com_subnetgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: subnetgroups.rds.aws.kubedb.com spec: group: rds.aws.kubedb.com @@ -58,7 +57,7 @@ spec: description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicy field in a future release. Currently, + in favor of the ManagementPolicies field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' @@ -75,6 +74,83 @@ spec: description: Region is the region you'd like your resource to be created in. type: string + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which + will attempt to resolve the reference only when the + corresponding field is not present. Use 'Always' to + resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subnetIds: description: A list of VPC subnet IDs. items: @@ -95,21 +171,61 @@ spec: block. type: object type: object - managementPolicy: - default: FullControl - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicy - specifies the level of control Crossplane has over the managed external - resource. This field is planned to replace the DeletionPolicy field - in a future release. Currently, both could be set independently - and non-default values would be honored if the feature flag is enabled. - See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' - enum: - - FullControl - - ObserveOnly - - OrphanOnDelete - type: string + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: The description of the DB subnet group. + type: string + tags: + additionalProperties: + type: string + description: A map of tags to assign to the resource. If configured + with a provider default_tags configuration block present, tags + with matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -148,42 +264,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -282,10 +362,9 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: region is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region) - - message: subnetIds is a required parameter - rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.subnetIds) + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' status: description: SubnetGroupStatus defines the observed state of SubnetGroup. properties: @@ -361,6 +440,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/secretsmanager.aws.kubedb.com_secrets.yaml b/package/crds/secretsmanager.aws.kubedb.com_secrets.yaml new file mode 100644 index 0000000..4d7f1c6 --- /dev/null +++ b/package/crds/secretsmanager.aws.kubedb.com_secrets.yaml @@ -0,0 +1,580 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: secrets.secretsmanager.aws.kubedb.com +spec: + group: secretsmanager.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: Secret + listKind: SecretList + plural: secrets + singular: secret + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Secret is the Schema for the Secrets API. Provides a resource + to manage AWS Secrets Manager secret metadata + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SecretSpec defines the desired state of Secret + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + description: + description: Description of the secret. + type: string + forceOverwriteReplicaSecret: + description: Accepts boolean value to specify whether to overwrite + a secret with the same name in the destination Region. + type: boolean + kmsKeyId: + description: ARN or Id of the AWS KMS key to be used to encrypt + the secret values in the versions stored in this secret. If + you need to reference a CMK in a different account, you can + use only the key ARN. If you don't specify this value, then + Secrets Manager defaults to using the AWS account's default + KMS key (the one named aws/secretsmanager). If the default KMS + key with that name doesn't yet exist, then AWS Secrets Manager + creates it for you automatically the first time. + type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + name: + description: 'Friendly name of the new secret. The secret name + can consist of uppercase letters, lowercase letters, digits, + and any of the following characters: /_+=.@- Conflicts with + name_prefix.' + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + recoveryWindowInDays: + description: Number of days that AWS Secrets Manager waits before + it can delete the secret. This value can be 0 to force deletion + without recovery or range from 7 to 30 days. The default value + is 30. + type: number + region: + description: Region for replicating the secret. Region is the + region you'd like your resource to be created in. + type: string + replica: + description: Configuration block to support secret replication. + See details below. + items: + properties: + kmsKeyId: + description: ARN, Key ID, or Alias of the AWS KMS key within + the region secret is replicated to. If one is not specified, + then Secrets Manager defaults to using the AWS account's + default KMS key (aws/secretsmanager) in the region or + creates one for use if non-existent. + type: string + region: + description: Region for replicating the secret. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: Key-value map of user-defined tags that are attached + to the secret. If configured with a provider default_tags configuration + block present, tags with matching keys will overwrite those + defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + description: + description: Description of the secret. + type: string + forceOverwriteReplicaSecret: + description: Accepts boolean value to specify whether to overwrite + a secret with the same name in the destination Region. + type: boolean + name: + description: 'Friendly name of the new secret. The secret name + can consist of uppercase letters, lowercase letters, digits, + and any of the following characters: /_+=.@- Conflicts with + name_prefix.' + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + recoveryWindowInDays: + description: Number of days that AWS Secrets Manager waits before + it can delete the secret. This value can be 0 to force deletion + without recovery or range from 7 to 30 days. The default value + is 30. + type: number + replica: + description: Configuration block to support secret replication. + See details below. + items: + properties: + kmsKeyId: + description: ARN, Key ID, or Alias of the AWS KMS key within + the region secret is replicated to. If one is not specified, + then Secrets Manager defaults to using the AWS account's + default KMS key (aws/secretsmanager) in the region or + creates one for use if non-existent. + type: string + region: + description: Region for replicating the secret. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: Key-value map of user-defined tags that are attached + to the secret. If configured with a provider default_tags configuration + block present, tags with matching keys will overwrite those + defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + status: + description: SecretStatus defines the observed state of Secret. + properties: + atProvider: + properties: + arn: + description: ARN of the secret. + type: string + description: + description: Description of the secret. + type: string + forceOverwriteReplicaSecret: + description: Accepts boolean value to specify whether to overwrite + a secret with the same name in the destination Region. + type: boolean + id: + description: ARN of the secret. + type: string + kmsKeyId: + description: ARN or Id of the AWS KMS key to be used to encrypt + the secret values in the versions stored in this secret. If + you need to reference a CMK in a different account, you can + use only the key ARN. If you don't specify this value, then + Secrets Manager defaults to using the AWS account's default + KMS key (the one named aws/secretsmanager). If the default KMS + key with that name doesn't yet exist, then AWS Secrets Manager + creates it for you automatically the first time. + type: string + name: + description: 'Friendly name of the new secret. The secret name + can consist of uppercase letters, lowercase letters, digits, + and any of the following characters: /_+=.@- Conflicts with + name_prefix.' + type: string + namePrefix: + description: Creates a unique name beginning with the specified + prefix. Conflicts with name. + type: string + policy: + description: Valid JSON document representing a resource policy. + Removing policy from your configuration or setting policy to + null or an empty string (i.e., policy = "") will not delete + the policy since it could have been set by aws_secretsmanager_secret_policy. + To delete the policy, set it to "{}" (an empty JSON document). + type: string + recoveryWindowInDays: + description: Number of days that AWS Secrets Manager waits before + it can delete the secret. This value can be 0 to force deletion + without recovery or range from 7 to 30 days. The default value + is 30. + type: number + replica: + description: Configuration block to support secret replication. + See details below. + items: + properties: + kmsKeyId: + description: ARN, Key ID, or Alias of the AWS KMS key within + the region secret is replicated to. If one is not specified, + then Secrets Manager defaults to using the AWS account's + default KMS key (aws/secretsmanager) in the region or + creates one for use if non-existent. + type: string + lastAccessedDate: + description: Date that you last accessed the secret in the + Region. + type: string + region: + description: Region for replicating the secret. + type: string + status: + description: Status can be InProgress, Failed, or InSync. + type: string + statusMessage: + description: Message such as Replication succeeded or Secret + with this name already exists in this region. + type: string + type: object + type: array + tags: + additionalProperties: + type: string + description: Key-value map of user-defined tags that are attached + to the secret. If configured with a provider default_tags configuration + block present, tags with matching keys will overwrite those + defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: Map of tags assigned to the resource, including those + inherited from the provider default_tags configuration block. + type: object + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/sns.aws.kubedb.com_topics.yaml b/package/crds/sns.aws.kubedb.com_topics.yaml new file mode 100644 index 0000000..a8d3214 --- /dev/null +++ b/package/crds/sns.aws.kubedb.com_topics.yaml @@ -0,0 +1,1297 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: topics.sns.aws.kubedb.com +spec: + group: sns.aws.kubedb.com + names: + categories: + - crossplane + - managed + - aws + kind: Topic + listKind: TopicList + plural: topics + singular: topic + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Topic is the Schema for the Topics API. Provides an SNS topic + resource. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TopicSpec defines the desired state of Topic + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + applicationFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + applicationFailureFeedbackRoleArnRef: + description: Reference to a Role in iam to populate applicationFailureFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + applicationFailureFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate applicationFailureFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + applicationSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + applicationSuccessFeedbackRoleArnRef: + description: Reference to a Role in iam to populate applicationSuccessFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + applicationSuccessFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate applicationSuccessFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + applicationSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + contentBasedDeduplication: + description: Enables content-based deduplication for FIFO topics. + For more information, see the related documentation + type: boolean + deliveryPolicy: + description: The SNS delivery policy. More on AWS documentation + type: string + displayName: + description: The display name for the topic + type: string + fifoTopic: + description: Boolean indicating whether or not to create a FIFO + (first-in-first-out) topic (default is false). + type: boolean + firehoseFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + firehoseFailureFeedbackRoleArnRef: + description: Reference to a Role in iam to populate firehoseFailureFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + firehoseFailureFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate firehoseFailureFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + firehoseSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + firehoseSuccessFeedbackRoleArnRef: + description: Reference to a Role in iam to populate firehoseSuccessFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + firehoseSuccessFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate firehoseSuccessFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + firehoseSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + httpFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + httpFailureFeedbackRoleArnRef: + description: Reference to a Role in iam to populate httpFailureFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + httpFailureFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate httpFailureFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + httpSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + httpSuccessFeedbackRoleArnRef: + description: Reference to a Role in iam to populate httpSuccessFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + httpSuccessFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate httpSuccessFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + httpSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + kmsMasterKeyId: + description: The ID of an AWS-managed customer master key (CMK) + for Amazon SNS or a custom CMK. For more information, see Key + Terms + type: string + lambdaFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + lambdaFailureFeedbackRoleArnRef: + description: Reference to a Role in iam to populate lambdaFailureFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + lambdaFailureFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate lambdaFailureFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + lambdaSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + lambdaSuccessFeedbackRoleArnRef: + description: Reference to a Role in iam to populate lambdaSuccessFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + lambdaSuccessFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate lambdaSuccessFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + lambdaSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + policy: + description: The fully-formed AWS policy as JSON. + type: string + region: + description: Region is the region you'd like your resource to + be created in. + type: string + signatureVersion: + description: If SignatureVersion should be 1 (SHA1) or 2 (SHA256). + The signature version corresponds to the hashing algorithm used + while creating the signature of the notifications, subscription + confirmations, or unsubscribe confirmation messages sent by + Amazon SNS. + type: number + sqsFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + sqsFailureFeedbackRoleArnRef: + description: Reference to a Role in iam to populate sqsFailureFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sqsFailureFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate sqsFailureFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + sqsSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + sqsSuccessFeedbackRoleArnRef: + description: Reference to a Role in iam to populate sqsSuccessFeedbackRoleArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + sqsSuccessFeedbackRoleArnSelector: + description: Selector for a Role in iam to populate sqsSuccessFeedbackRoleArn. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + sqsSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + tracingConfig: + description: 'Tracing mode of an Amazon SNS topic. Valid values: + "PassThrough", "Active".' + type: string + type: object + initProvider: + description: 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 of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are 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. + properties: + applicationSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + contentBasedDeduplication: + description: Enables content-based deduplication for FIFO topics. + For more information, see the related documentation + type: boolean + deliveryPolicy: + description: The SNS delivery policy. More on AWS documentation + type: string + displayName: + description: The display name for the topic + type: string + fifoTopic: + description: Boolean indicating whether or not to create a FIFO + (first-in-first-out) topic (default is false). + type: boolean + firehoseSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + httpSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + kmsMasterKeyId: + description: The ID of an AWS-managed customer master key (CMK) + for Amazon SNS or a custom CMK. For more information, see Key + Terms + type: string + lambdaSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + policy: + description: The fully-formed AWS policy as JSON. + type: string + signatureVersion: + description: If SignatureVersion should be 1 (SHA1) or 2 (SHA256). + The signature version corresponds to the hashing algorithm used + while creating the signature of the notifications, subscription + confirmations, or unsubscribe confirmation messages sent by + Amazon SNS. + type: number + sqsSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + tracingConfig: + description: 'Tracing mode of an Amazon SNS topic. Valid values: + "PassThrough", "Active".' + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region)' + status: + description: TopicStatus defines the observed state of Topic. + properties: + atProvider: + properties: + applicationFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + applicationSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + applicationSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + arn: + description: The ARN of the SNS topic, as a more obvious property + (clone of id) + type: string + contentBasedDeduplication: + description: Enables content-based deduplication for FIFO topics. + For more information, see the related documentation + type: boolean + deliveryPolicy: + description: The SNS delivery policy. More on AWS documentation + type: string + displayName: + description: The display name for the topic + type: string + fifoTopic: + description: Boolean indicating whether or not to create a FIFO + (first-in-first-out) topic (default is false). + type: boolean + firehoseFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + firehoseSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + firehoseSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + httpFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + httpSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + httpSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + id: + description: The ARN of the SNS topic + type: string + kmsMasterKeyId: + description: The ID of an AWS-managed customer master key (CMK) + for Amazon SNS or a custom CMK. For more information, see Key + Terms + type: string + lambdaFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + lambdaSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + lambdaSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + owner: + description: The AWS Account ID of the SNS topic owner + type: string + policy: + description: The fully-formed AWS policy as JSON. + type: string + signatureVersion: + description: If SignatureVersion should be 1 (SHA1) or 2 (SHA256). + The signature version corresponds to the hashing algorithm used + while creating the signature of the notifications, subscription + confirmations, or unsubscribe confirmation messages sent by + Amazon SNS. + type: number + sqsFailureFeedbackRoleArn: + description: IAM role for failure feedback + type: string + sqsSuccessFeedbackRoleArn: + description: The IAM role permitted to receive success feedback + for this topic + type: string + sqsSuccessFeedbackSampleRate: + description: Percentage of success to sample + type: number + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. If configured with + a provider default_tags configuration block present, tags with + matching keys will overwrite those defined at the provider-level. + type: object + tagsAll: + additionalProperties: + type: string + description: A map of tags assigned to the resource, including + those inherited from the provider default_tags configuration + block. + type: object + tracingConfig: + description: 'Tracing mode of an Amazon SNS topic. Valid values: + "PassThrough", "Active".' + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}