From 5a023ad8d9c004479ddb4568b118fb83c69ffc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20T=C3=BCrken?= Date: Wed, 28 Aug 2024 01:17:23 +0300 Subject: [PATCH] Configure LBTrustStore resource and add example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fatih Türken --- .../v1beta1/zz_generated.conversion_hubs.go | 3 + apis/elbv2/v1beta1/zz_generated.deepcopy.go | 283 ++++++++++++ apis/elbv2/v1beta1/zz_generated.managed.go | 60 +++ .../elbv2/v1beta1/zz_generated.managedlist.go | 9 + .../v1beta1/zz_lbtruststore_terraformed.go | 129 ++++++ apis/elbv2/v1beta1/zz_lbtruststore_types.go | 157 +++++++ config/elbv2/config.go | 5 + config/externalname.go | 2 + config/generated.lst | 1 + .../elbv2/v1beta1/lbtruststore.yaml | 39 ++ examples/elbv2/v1beta1/lbtruststore.yaml | 14 + .../elbv2/lbtruststore/zz_controller.go | 94 ++++ internal/controller/zz_elbv2_setup.go | 2 + internal/controller/zz_monolith_setup.go | 2 + .../elbv2.aws.upbound.io_lbtruststores.yaml | 426 ++++++++++++++++++ 15 files changed, 1226 insertions(+) create mode 100755 apis/elbv2/v1beta1/zz_lbtruststore_terraformed.go create mode 100755 apis/elbv2/v1beta1/zz_lbtruststore_types.go create mode 100644 examples-generated/elbv2/v1beta1/lbtruststore.yaml create mode 100644 examples/elbv2/v1beta1/lbtruststore.yaml create mode 100755 internal/controller/elbv2/lbtruststore/zz_controller.go create mode 100644 package/crds/elbv2.aws.upbound.io_lbtruststores.yaml diff --git a/apis/elbv2/v1beta1/zz_generated.conversion_hubs.go b/apis/elbv2/v1beta1/zz_generated.conversion_hubs.go index ec94ba711b..786776de32 100755 --- a/apis/elbv2/v1beta1/zz_generated.conversion_hubs.go +++ b/apis/elbv2/v1beta1/zz_generated.conversion_hubs.go @@ -11,3 +11,6 @@ func (tr *LBListenerCertificate) Hub() {} // Hub marks this type as a conversion hub. func (tr *LBTargetGroupAttachment) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *LBTrustStore) Hub() {} diff --git a/apis/elbv2/v1beta1/zz_generated.deepcopy.go b/apis/elbv2/v1beta1/zz_generated.deepcopy.go index 1c33433a1e..9137bef409 100644 --- a/apis/elbv2/v1beta1/zz_generated.deepcopy.go +++ b/apis/elbv2/v1beta1/zz_generated.deepcopy.go @@ -5329,6 +5329,289 @@ func (in *LBTargetGroupStickinessParameters) DeepCopy() *LBTargetGroupStickiness return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LBTrustStore) DeepCopyInto(out *LBTrustStore) { + *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 LBTrustStore. +func (in *LBTrustStore) DeepCopy() *LBTrustStore { + if in == nil { + return nil + } + out := new(LBTrustStore) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LBTrustStore) 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 *LBTrustStoreInitParameters) DeepCopyInto(out *LBTrustStoreInitParameters) { + *out = *in + if in.CACertificatesBundleS3Bucket != nil { + in, out := &in.CACertificatesBundleS3Bucket, &out.CACertificatesBundleS3Bucket + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3Key != nil { + in, out := &in.CACertificatesBundleS3Key, &out.CACertificatesBundleS3Key + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3ObjectVersion != nil { + in, out := &in.CACertificatesBundleS3ObjectVersion, &out.CACertificatesBundleS3ObjectVersion + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *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 + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBTrustStoreInitParameters. +func (in *LBTrustStoreInitParameters) DeepCopy() *LBTrustStoreInitParameters { + if in == nil { + return nil + } + out := new(LBTrustStoreInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LBTrustStoreList) DeepCopyInto(out *LBTrustStoreList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LBTrustStore, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBTrustStoreList. +func (in *LBTrustStoreList) DeepCopy() *LBTrustStoreList { + if in == nil { + return nil + } + out := new(LBTrustStoreList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LBTrustStoreList) 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 *LBTrustStoreObservation) DeepCopyInto(out *LBTrustStoreObservation) { + *out = *in + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.ArnSuffix != nil { + in, out := &in.ArnSuffix, &out.ArnSuffix + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3Bucket != nil { + in, out := &in.CACertificatesBundleS3Bucket, &out.CACertificatesBundleS3Bucket + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3Key != nil { + in, out := &in.CACertificatesBundleS3Key, &out.CACertificatesBundleS3Key + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3ObjectVersion != nil { + in, out := &in.CACertificatesBundleS3ObjectVersion, &out.CACertificatesBundleS3ObjectVersion + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *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 LBTrustStoreObservation. +func (in *LBTrustStoreObservation) DeepCopy() *LBTrustStoreObservation { + if in == nil { + return nil + } + out := new(LBTrustStoreObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LBTrustStoreParameters) DeepCopyInto(out *LBTrustStoreParameters) { + *out = *in + if in.CACertificatesBundleS3Bucket != nil { + in, out := &in.CACertificatesBundleS3Bucket, &out.CACertificatesBundleS3Bucket + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3Key != nil { + in, out := &in.CACertificatesBundleS3Key, &out.CACertificatesBundleS3Key + *out = new(string) + **out = **in + } + if in.CACertificatesBundleS3ObjectVersion != nil { + in, out := &in.CACertificatesBundleS3ObjectVersion, &out.CACertificatesBundleS3ObjectVersion + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *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 + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBTrustStoreParameters. +func (in *LBTrustStoreParameters) DeepCopy() *LBTrustStoreParameters { + if in == nil { + return nil + } + out := new(LBTrustStoreParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LBTrustStoreSpec) DeepCopyInto(out *LBTrustStoreSpec) { + *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 LBTrustStoreSpec. +func (in *LBTrustStoreSpec) DeepCopy() *LBTrustStoreSpec { + if in == nil { + return nil + } + out := new(LBTrustStoreSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LBTrustStoreStatus) DeepCopyInto(out *LBTrustStoreStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBTrustStoreStatus. +func (in *LBTrustStoreStatus) DeepCopy() *LBTrustStoreStatus { + if in == nil { + return nil + } + out := new(LBTrustStoreStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutualAuthenticationInitParameters) DeepCopyInto(out *MutualAuthenticationInitParameters) { *out = *in diff --git a/apis/elbv2/v1beta1/zz_generated.managed.go b/apis/elbv2/v1beta1/zz_generated.managed.go index e43319fdc9..6b7116cb74 100644 --- a/apis/elbv2/v1beta1/zz_generated.managed.go +++ b/apis/elbv2/v1beta1/zz_generated.managed.go @@ -366,3 +366,63 @@ func (mg *LBTargetGroupAttachment) SetPublishConnectionDetailsTo(r *xpv1.Publish func (mg *LBTargetGroupAttachment) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } + +// GetCondition of this LBTrustStore. +func (mg *LBTrustStore) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this LBTrustStore. +func (mg *LBTrustStore) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this LBTrustStore. +func (mg *LBTrustStore) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this LBTrustStore. +func (mg *LBTrustStore) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this LBTrustStore. +func (mg *LBTrustStore) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this LBTrustStore. +func (mg *LBTrustStore) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this LBTrustStore. +func (mg *LBTrustStore) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this LBTrustStore. +func (mg *LBTrustStore) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this LBTrustStore. +func (mg *LBTrustStore) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this LBTrustStore. +func (mg *LBTrustStore) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this LBTrustStore. +func (mg *LBTrustStore) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this LBTrustStore. +func (mg *LBTrustStore) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/elbv2/v1beta1/zz_generated.managedlist.go b/apis/elbv2/v1beta1/zz_generated.managedlist.go index 291a9c3742..1af4669d77 100644 --- a/apis/elbv2/v1beta1/zz_generated.managedlist.go +++ b/apis/elbv2/v1beta1/zz_generated.managedlist.go @@ -60,3 +60,12 @@ func (l *LBTargetGroupList) GetItems() []resource.Managed { } return items } + +// GetItems of this LBTrustStoreList. +func (l *LBTrustStoreList) 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/elbv2/v1beta1/zz_lbtruststore_terraformed.go b/apis/elbv2/v1beta1/zz_lbtruststore_terraformed.go new file mode 100755 index 0000000000..f4e9d88bb5 --- /dev/null +++ b/apis/elbv2/v1beta1/zz_lbtruststore_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta1 + +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 LBTrustStore +func (mg *LBTrustStore) GetTerraformResourceType() string { + return "aws_lb_trust_store" +} + +// GetConnectionDetailsMapping for this LBTrustStore +func (tr *LBTrustStore) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore +func (tr *LBTrustStore) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore +func (tr *LBTrustStore) 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 LBTrustStore using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *LBTrustStore) LateInitialize(attrs []byte) (bool, error) { + params := &LBTrustStoreParameters{} + 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 *LBTrustStore) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/elbv2/v1beta1/zz_lbtruststore_types.go b/apis/elbv2/v1beta1/zz_lbtruststore_types.go new file mode 100755 index 0000000000..c613feefff --- /dev/null +++ b/apis/elbv2/v1beta1/zz_lbtruststore_types.go @@ -0,0 +1,157 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta1 + +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 LBTrustStoreInitParameters struct { + + // S3 Bucket name holding the client certificate CA bundle. + CACertificatesBundleS3Bucket *string `json:"caCertificatesBundleS3Bucket,omitempty" tf:"ca_certificates_bundle_s3_bucket,omitempty"` + + // S3 object key holding the client certificate CA bundle. + CACertificatesBundleS3Key *string `json:"caCertificatesBundleS3Key,omitempty" tf:"ca_certificates_bundle_s3_key,omitempty"` + + // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. + CACertificatesBundleS3ObjectVersion *string `json:"caCertificatesBundleS3ObjectVersion,omitempty" tf:"ca_certificates_bundle_s3_object_version,omitempty"` + + // Name of the Trust Store. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Key-value map of resource tags. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type LBTrustStoreObservation struct { + + // ARN of the Trust Store (matches id). + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // ARN suffix for use with CloudWatch Metrics. + ArnSuffix *string `json:"arnSuffix,omitempty" tf:"arn_suffix,omitempty"` + + // S3 Bucket name holding the client certificate CA bundle. + CACertificatesBundleS3Bucket *string `json:"caCertificatesBundleS3Bucket,omitempty" tf:"ca_certificates_bundle_s3_bucket,omitempty"` + + // S3 object key holding the client certificate CA bundle. + CACertificatesBundleS3Key *string `json:"caCertificatesBundleS3Key,omitempty" tf:"ca_certificates_bundle_s3_key,omitempty"` + + // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. + CACertificatesBundleS3ObjectVersion *string `json:"caCertificatesBundleS3ObjectVersion,omitempty" tf:"ca_certificates_bundle_s3_object_version,omitempty"` + + // ARN of the Trust Store (matches arn). + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Name of the Trust Store. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Key-value map of resource tags. + // +mapType=granular + 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. + // +mapType=granular + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` +} + +type LBTrustStoreParameters struct { + + // S3 Bucket name holding the client certificate CA bundle. + // +kubebuilder:validation:Optional + CACertificatesBundleS3Bucket *string `json:"caCertificatesBundleS3Bucket,omitempty" tf:"ca_certificates_bundle_s3_bucket,omitempty"` + + // S3 object key holding the client certificate CA bundle. + // +kubebuilder:validation:Optional + CACertificatesBundleS3Key *string `json:"caCertificatesBundleS3Key,omitempty" tf:"ca_certificates_bundle_s3_key,omitempty"` + + // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. + // +kubebuilder:validation:Optional + CACertificatesBundleS3ObjectVersion *string `json:"caCertificatesBundleS3ObjectVersion,omitempty" tf:"ca_certificates_bundle_s3_object_version,omitempty"` + + // Name of the Trust Store. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Required + Region *string `json:"region" tf:"-"` + + // Key-value map of resource tags. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +// LBTrustStoreSpec defines the desired state of LBTrustStore +type LBTrustStoreSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider LBTrustStoreParameters `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 LBTrustStoreInitParameters `json:"initProvider,omitempty"` +} + +// LBTrustStoreStatus defines the observed state of LBTrustStore. +type LBTrustStoreStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider LBTrustStoreObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// LBTrustStore is the Schema for the LBTrustStores API. Provides a Trust Store resource for use with Load Balancers. +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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:resource:scope=Cluster,categories={crossplane,managed,aws} +type LBTrustStore 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.caCertificatesBundleS3Bucket) || (has(self.initProvider) && has(self.initProvider.caCertificatesBundleS3Bucket))",message="spec.forProvider.caCertificatesBundleS3Bucket is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.caCertificatesBundleS3Key) || (has(self.initProvider) && has(self.initProvider.caCertificatesBundleS3Key))",message="spec.forProvider.caCertificatesBundleS3Key is a required parameter" + Spec LBTrustStoreSpec `json:"spec"` + Status LBTrustStoreStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// LBTrustStoreList contains a list of LBTrustStores +type LBTrustStoreList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LBTrustStore `json:"items"` +} + +// Repository type metadata. +var ( + LBTrustStore_Kind = "LBTrustStore" + LBTrustStore_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: LBTrustStore_Kind}.String() + LBTrustStore_KindAPIVersion = LBTrustStore_Kind + "." + CRDGroupVersion.String() + LBTrustStore_GroupVersionKind = CRDGroupVersion.WithKind(LBTrustStore_Kind) +) + +func init() { + SchemeBuilder.Register(&LBTrustStore{}, &LBTrustStoreList{}) +} diff --git a/config/elbv2/config.go b/config/elbv2/config.go index cf93bb8cfe..4bbcde047f 100644 --- a/config/elbv2/config.go +++ b/config/elbv2/config.go @@ -64,4 +64,9 @@ func Configure(p *config.Provider) { } r.UseAsync = true }) + + p.AddResourceConfigurator("aws_lb_trust_store", func(r *config.Resource) { + r.ShortGroup = "elbv2" + r.Kind = "LBTrustStore" + }) } diff --git a/config/externalname.go b/config/externalname.go index d5b50bbdc6..00e99b3277 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -1211,6 +1211,8 @@ var TerraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{ "aws_lb_target_group": config.IdentifierFromProvider, // No import. "aws_lb_target_group_attachment": config.IdentifierFromProvider, + // Trust Stores can be imported using their ARN + "aws_lb_trust_store": config.IdentifierFromProvider, // emr // diff --git a/config/generated.lst b/config/generated.lst index 4aca34901c..cc93e2027a 100644 --- a/config/generated.lst +++ b/config/generated.lst @@ -536,6 +536,7 @@ "aws_lb_ssl_negotiation_policy", "aws_lb_target_group", "aws_lb_target_group_attachment", +"aws_lb_trust_store", "aws_lex_bot", "aws_lex_bot_alias", "aws_lex_intent", diff --git a/examples-generated/elbv2/v1beta1/lbtruststore.yaml b/examples-generated/elbv2/v1beta1/lbtruststore.yaml new file mode 100644 index 0000000000..a185b03ff3 --- /dev/null +++ b/examples-generated/elbv2/v1beta1/lbtruststore.yaml @@ -0,0 +1,39 @@ +apiVersion: elbv2.aws.upbound.io/v1beta1 +kind: LBTrustStore +metadata: + annotations: + meta.upbound.io/example-id: elbv2/v1beta1/lbtruststore + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + caCertificatesBundleS3Bucket: '...' + caCertificatesBundleS3Key: '...' + name: tf-example-lb-ts + region: us-west-1 + +--- + +apiVersion: elbv2.aws.upbound.io/v1beta2 +kind: LBListener +metadata: + annotations: + meta.upbound.io/example-id: elbv2/v1beta1/lbtruststore + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + defaultAction: + - targetGroupArnSelector: + matchLabels: + testing.upbound.io/example-name: example + type: forward + loadBalancerArnSelector: + matchLabels: + testing.upbound.io/example-name: example + mutualAuthentication: + mode: verify + trustStoreArn: ${aws_lb_trust_store.test.arn} + region: us-west-1 diff --git a/examples/elbv2/v1beta1/lbtruststore.yaml b/examples/elbv2/v1beta1/lbtruststore.yaml new file mode 100644 index 0000000000..6d392746a5 --- /dev/null +++ b/examples/elbv2/v1beta1/lbtruststore.yaml @@ -0,0 +1,14 @@ +apiVersion: elbv2.aws.upbound.io/v1beta1 +kind: LBTrustStore +metadata: + annotations: + meta.upbound.io/example-id: elbv2/v1beta1/lbtruststore + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + caCertificatesBundleS3Bucket: uptest-test-lbtrusttore + caCertificatesBundleS3Key: certificates/ca_certificate.pem + name: upbound-ex-lb-ts + region: us-west-1 diff --git a/internal/controller/elbv2/lbtruststore/zz_controller.go b/internal/controller/elbv2/lbtruststore/zz_controller.go new file mode 100755 index 0000000000..992d477904 --- /dev/null +++ b/internal/controller/elbv2/lbtruststore/zz_controller.go @@ -0,0 +1,94 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package lbtruststore + +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" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-aws/apis/elbv2/v1beta1" + features "github.com/upbound/provider-aws/internal/features" +) + +// Setup adds a controller that reconciles LBTrustStore managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.LBTrustStore_GroupVersionKind.String()) + var initializers managed.InitializerChain + for _, i := range o.Provider.Resources["aws_lb_trust_store"].InitializerFns { + initializers = append(initializers, i(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", v1beta1.LBTrustStore_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.LBTrustStore_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewTerraformPluginSDKAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["aws_lb_trust_store"], + tjcontroller.WithTerraformPluginSDKAsyncLogger(o.Logger), + tjcontroller.WithTerraformPluginSDKAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithTerraformPluginSDKAsyncCallbackProvider(ac), + tjcontroller.WithTerraformPluginSDKAsyncMetricRecorder(metrics.NewMetricRecorder(v1beta1.LBTrustStore_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithTerraformPluginSDKAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewOperationTrackerFinalizer(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()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1beta1.LBTrustStore + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1beta1.LBTrustStore{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1beta1.LBTrustStore") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1beta1.LBTrustStoreList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1beta1.LBTrustStoreList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1beta1.LBTrustStore_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1beta1.LBTrustStore{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_elbv2_setup.go b/internal/controller/zz_elbv2_setup.go index 8b16682311..008041f9d2 100755 --- a/internal/controller/zz_elbv2_setup.go +++ b/internal/controller/zz_elbv2_setup.go @@ -15,6 +15,7 @@ import ( lblistenerrule "github.com/upbound/provider-aws/internal/controller/elbv2/lblistenerrule" lbtargetgroup "github.com/upbound/provider-aws/internal/controller/elbv2/lbtargetgroup" lbtargetgroupattachment "github.com/upbound/provider-aws/internal/controller/elbv2/lbtargetgroupattachment" + lbtruststore "github.com/upbound/provider-aws/internal/controller/elbv2/lbtruststore" ) // Setup_elbv2 creates all controllers with the supplied logger and adds them to @@ -27,6 +28,7 @@ func Setup_elbv2(mgr ctrl.Manager, o controller.Options) error { lblistenerrule.Setup, lbtargetgroup.Setup, lbtargetgroupattachment.Setup, + lbtruststore.Setup, } { if err := setup(mgr, o); err != nil { return err diff --git a/internal/controller/zz_monolith_setup.go b/internal/controller/zz_monolith_setup.go index e1d99ba324..81aaa80844 100755 --- a/internal/controller/zz_monolith_setup.go +++ b/internal/controller/zz_monolith_setup.go @@ -453,6 +453,7 @@ import ( lblistenerrule "github.com/upbound/provider-aws/internal/controller/elbv2/lblistenerrule" lbtargetgroup "github.com/upbound/provider-aws/internal/controller/elbv2/lbtargetgroup" lbtargetgroupattachment "github.com/upbound/provider-aws/internal/controller/elbv2/lbtargetgroupattachment" + lbtruststore "github.com/upbound/provider-aws/internal/controller/elbv2/lbtruststore" securityconfiguration "github.com/upbound/provider-aws/internal/controller/emr/securityconfiguration" applicationemrserverless "github.com/upbound/provider-aws/internal/controller/emrserverless/application" feature "github.com/upbound/provider-aws/internal/controller/evidently/feature" @@ -1410,6 +1411,7 @@ func Setup_monolith(mgr ctrl.Manager, o controller.Options) error { lblistenerrule.Setup, lbtargetgroup.Setup, lbtargetgroupattachment.Setup, + lbtruststore.Setup, securityconfiguration.Setup, applicationemrserverless.Setup, feature.Setup, diff --git a/package/crds/elbv2.aws.upbound.io_lbtruststores.yaml b/package/crds/elbv2.aws.upbound.io_lbtruststores.yaml new file mode 100644 index 0000000000..861af6e219 --- /dev/null +++ b/package/crds/elbv2.aws.upbound.io_lbtruststores.yaml @@ -0,0 +1,426 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: lbtruststores.elbv2.aws.upbound.io +spec: + group: elbv2.aws.upbound.io + names: + categories: + - crossplane + - managed + - aws + kind: LBTrustStore + listKind: LBTrustStoreList + plural: lbtruststores + singular: lbtruststore + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: LBTrustStore is the Schema for the LBTrustStores API. Provides + a Trust Store resource for use with Load Balancers. + 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: LBTrustStoreSpec defines the desired state of LBTrustStore + 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: + caCertificatesBundleS3Bucket: + description: S3 Bucket name holding the client certificate CA + bundle. + type: string + caCertificatesBundleS3Key: + description: S3 object key holding the client certificate CA bundle. + type: string + caCertificatesBundleS3ObjectVersion: + description: Version Id of CA bundle S3 bucket object, if versioned, + defaults to latest if omitted. + type: string + name: + description: Name of the Trust Store. This name must be unique + per region per account, can have a maximum of 32 characters, + must contain only alphanumeric characters or hyphens, and must + not begin or end with a hyphen. + type: string + region: + description: Region is the region you'd like your resource to + be created in. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + required: + - region + 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: + caCertificatesBundleS3Bucket: + description: S3 Bucket name holding the client certificate CA + bundle. + type: string + caCertificatesBundleS3Key: + description: S3 object key holding the client certificate CA bundle. + type: string + caCertificatesBundleS3ObjectVersion: + description: Version Id of CA bundle S3 bucket object, if versioned, + defaults to latest if omitted. + type: string + name: + description: Name of the Trust Store. This name must be unique + per region per account, can have a maximum of 32 characters, + must contain only alphanumeric characters or hyphens, and must + not begin or end with a hyphen. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + 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.caCertificatesBundleS3Bucket is a required + parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.caCertificatesBundleS3Bucket) + || (has(self.initProvider) && has(self.initProvider.caCertificatesBundleS3Bucket))' + - message: spec.forProvider.caCertificatesBundleS3Key is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.caCertificatesBundleS3Key) + || (has(self.initProvider) && has(self.initProvider.caCertificatesBundleS3Key))' + status: + description: LBTrustStoreStatus defines the observed state of LBTrustStore. + properties: + atProvider: + properties: + arn: + description: ARN of the Trust Store (matches id). + type: string + arnSuffix: + description: ARN suffix for use with CloudWatch Metrics. + type: string + caCertificatesBundleS3Bucket: + description: S3 Bucket name holding the client certificate CA + bundle. + type: string + caCertificatesBundleS3Key: + description: S3 object key holding the client certificate CA bundle. + type: string + caCertificatesBundleS3ObjectVersion: + description: Version Id of CA bundle S3 bucket object, if versioned, + defaults to latest if omitted. + type: string + id: + description: ARN of the Trust Store (matches arn). + type: string + name: + description: Name of the Trust Store. This name must be unique + per region per account, can have a maximum of 32 characters, + must contain only alphanumeric characters or hyphens, and must + not begin or end with a hyphen. + type: string + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + 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 + x-kubernetes-map-type: granular + 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 + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + 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 + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}