From ef09f57a0d592288e54147a4be2c179cd3ab746e Mon Sep 17 00:00:00 2001 From: Fumigatus Date: Tue, 29 Aug 2023 16:47:11 +0300 Subject: [PATCH] fixed blueprint version issue and added storage, aws, azure, vsphere --- .../v1alpha1/zz_generated_terraformed.go | 74 + .../storage/v1alpha1/zz_generated.deepcopy.go | 1534 +++++++++++++++++ apis/storage/v1alpha1/zz_generated.managed.go | 312 ++++ .../v1alpha1/zz_generated.managedlist.go | 44 + .../v1alpha1/zz_generated_terraformed.go | 310 ++++ apis/storage/v1alpha1/zz_groupversion_info.go | 32 + apis/storage/v1alpha1/zz_profile_types.go | 174 ++ apis/storage/v1alpha1/zz_profileaws_types.go | 156 ++ .../storage/v1alpha1/zz_profileazure_types.go | 161 ++ .../v1alpha1/zz_profilevsphere_types.go | 216 +++ apis/zz_register.go | 3 +- config/blueprint/config.go | 2 +- config/external_name.go | 4 + config/provider.go | 2 + config/storage/config.go | 30 + .../storage/profile/zz_controller.go | 55 + .../storage/profileaws/zz_controller.go | 55 + .../storage/profileazure/zz_controller.go | 55 + .../storage/profilevsphere/zz_controller.go | 55 + internal/controller/zz_setup.go | 8 + .../storage.crossplane.io_profileaws.yaml | 388 +++++ .../storage.crossplane.io_profileazures.yaml | 392 +++++ .../crds/storage.crossplane.io_profiles.yaml | 426 +++++ ...storage.crossplane.io_profilevspheres.yaml | 468 +++++ 24 files changed, 4954 insertions(+), 2 deletions(-) create mode 100644 apis/storage/v1alpha1/zz_generated.deepcopy.go create mode 100644 apis/storage/v1alpha1/zz_generated.managed.go create mode 100644 apis/storage/v1alpha1/zz_generated.managedlist.go create mode 100755 apis/storage/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/storage/v1alpha1/zz_groupversion_info.go create mode 100755 apis/storage/v1alpha1/zz_profile_types.go create mode 100755 apis/storage/v1alpha1/zz_profileaws_types.go create mode 100755 apis/storage/v1alpha1/zz_profileazure_types.go create mode 100755 apis/storage/v1alpha1/zz_profilevsphere_types.go create mode 100644 config/storage/config.go create mode 100755 internal/controller/storage/profile/zz_controller.go create mode 100755 internal/controller/storage/profileaws/zz_controller.go create mode 100755 internal/controller/storage/profileazure/zz_controller.go create mode 100755 internal/controller/storage/profilevsphere/zz_controller.go create mode 100644 package/crds/storage.crossplane.io_profileaws.yaml create mode 100644 package/crds/storage.crossplane.io_profileazures.yaml create mode 100644 package/crds/storage.crossplane.io_profiles.yaml create mode 100644 package/crds/storage.crossplane.io_profilevspheres.yaml diff --git a/apis/blueprint/v1alpha1/zz_generated_terraformed.go b/apis/blueprint/v1alpha1/zz_generated_terraformed.go index a7af021..d927923 100755 --- a/apis/blueprint/v1alpha1/zz_generated_terraformed.go +++ b/apis/blueprint/v1alpha1/zz_generated_terraformed.go @@ -86,3 +86,77 @@ func (tr *Blueprint) LateInitialize(attrs []byte) (bool, error) { func (tr *Blueprint) GetTerraformSchemaVersion() int { return 0 } + +// GetTerraformResourceType returns Terraform resource type for this Version +func (mg *Version) GetTerraformResourceType() string { + return "vra_blueprint_version" +} + +// GetConnectionDetailsMapping for this Version +func (tr *Version) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Version +func (tr *Version) 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 Version +func (tr *Version) 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 Version +func (tr *Version) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Version +func (tr *Version) 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 Version +func (tr *Version) 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) +} + +// LateInitialize this Version using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Version) LateInitialize(attrs []byte) (bool, error) { + params := &VersionParameters{} + 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 *Version) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/storage/v1alpha1/zz_generated.deepcopy.go b/apis/storage/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..72bf49b --- /dev/null +++ b/apis/storage/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,1534 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// 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 *LinksObservation) DeepCopyInto(out *LinksObservation) { + *out = *in + if in.Href != nil { + in, out := &in.Href, &out.Href + *out = new(string) + **out = **in + } + if in.Hrefs != nil { + in, out := &in.Hrefs, &out.Hrefs + *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.Rel != nil { + in, out := &in.Rel, &out.Rel + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinksObservation. +func (in *LinksObservation) DeepCopy() *LinksObservation { + if in == nil { + return nil + } + out := new(LinksObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LinksParameters) DeepCopyInto(out *LinksParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinksParameters. +func (in *LinksParameters) DeepCopy() *LinksParameters { + if in == nil { + return nil + } + out := new(LinksParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Profile) DeepCopyInto(out *Profile) { + *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 Profile. +func (in *Profile) DeepCopy() *Profile { + if in == nil { + return nil + } + out := new(Profile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Profile) 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 *ProfileAws) DeepCopyInto(out *ProfileAws) { + *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 ProfileAws. +func (in *ProfileAws) DeepCopy() *ProfileAws { + if in == nil { + return nil + } + out := new(ProfileAws) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileAws) 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 *ProfileAwsLinksObservation) DeepCopyInto(out *ProfileAwsLinksObservation) { + *out = *in + if in.Href != nil { + in, out := &in.Href, &out.Href + *out = new(string) + **out = **in + } + if in.Hrefs != nil { + in, out := &in.Hrefs, &out.Hrefs + *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.Rel != nil { + in, out := &in.Rel, &out.Rel + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAwsLinksObservation. +func (in *ProfileAwsLinksObservation) DeepCopy() *ProfileAwsLinksObservation { + if in == nil { + return nil + } + out := new(ProfileAwsLinksObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsLinksParameters) DeepCopyInto(out *ProfileAwsLinksParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAwsLinksParameters. +func (in *ProfileAwsLinksParameters) DeepCopy() *ProfileAwsLinksParameters { + if in == nil { + return nil + } + out := new(ProfileAwsLinksParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsList) DeepCopyInto(out *ProfileAwsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProfileAws, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAwsList. +func (in *ProfileAwsList) DeepCopy() *ProfileAwsList { + if in == nil { + return nil + } + out := new(ProfileAwsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileAwsList) 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 *ProfileAwsObservation) DeepCopyInto(out *ProfileAwsObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DeviceType != nil { + in, out := &in.DeviceType, &out.DeviceType + *out = new(string) + **out = **in + } + if in.ExternalRegionID != nil { + in, out := &in.ExternalRegionID, &out.ExternalRegionID + *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(string) + **out = **in + } + if in.Links != nil { + in, out := &in.Links, &out.Links + *out = make([]ProfileAwsLinksObservation, 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.OrganizationID != nil { + in, out := &in.OrganizationID, &out.OrganizationID + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileAwsTagsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **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 ProfileAwsObservation. +func (in *ProfileAwsObservation) DeepCopy() *ProfileAwsObservation { + if in == nil { + return nil + } + out := new(ProfileAwsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsParameters) DeepCopyInto(out *ProfileAwsParameters) { + *out = *in + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DeviceType != nil { + in, out := &in.DeviceType, &out.DeviceType + *out = new(string) + **out = **in + } + if in.Iops != nil { + in, out := &in.Iops, &out.Iops + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileAwsTagsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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 ProfileAwsParameters. +func (in *ProfileAwsParameters) DeepCopy() *ProfileAwsParameters { + if in == nil { + return nil + } + out := new(ProfileAwsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsSpec) DeepCopyInto(out *ProfileAwsSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAwsSpec. +func (in *ProfileAwsSpec) DeepCopy() *ProfileAwsSpec { + if in == nil { + return nil + } + out := new(ProfileAwsSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsStatus) DeepCopyInto(out *ProfileAwsStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAwsStatus. +func (in *ProfileAwsStatus) DeepCopy() *ProfileAwsStatus { + if in == nil { + return nil + } + out := new(ProfileAwsStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsTagsObservation) DeepCopyInto(out *ProfileAwsTagsObservation) { + *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 ProfileAwsTagsObservation. +func (in *ProfileAwsTagsObservation) DeepCopy() *ProfileAwsTagsObservation { + if in == nil { + return nil + } + out := new(ProfileAwsTagsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAwsTagsParameters) DeepCopyInto(out *ProfileAwsTagsParameters) { + *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 ProfileAwsTagsParameters. +func (in *ProfileAwsTagsParameters) DeepCopy() *ProfileAwsTagsParameters { + if in == nil { + return nil + } + out := new(ProfileAwsTagsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzure) DeepCopyInto(out *ProfileAzure) { + *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 ProfileAzure. +func (in *ProfileAzure) DeepCopy() *ProfileAzure { + if in == nil { + return nil + } + out := new(ProfileAzure) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileAzure) 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 *ProfileAzureLinksObservation) DeepCopyInto(out *ProfileAzureLinksObservation) { + *out = *in + if in.Href != nil { + in, out := &in.Href, &out.Href + *out = new(string) + **out = **in + } + if in.Hrefs != nil { + in, out := &in.Hrefs, &out.Hrefs + *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.Rel != nil { + in, out := &in.Rel, &out.Rel + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureLinksObservation. +func (in *ProfileAzureLinksObservation) DeepCopy() *ProfileAzureLinksObservation { + if in == nil { + return nil + } + out := new(ProfileAzureLinksObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureLinksParameters) DeepCopyInto(out *ProfileAzureLinksParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureLinksParameters. +func (in *ProfileAzureLinksParameters) DeepCopy() *ProfileAzureLinksParameters { + if in == nil { + return nil + } + out := new(ProfileAzureLinksParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureList) DeepCopyInto(out *ProfileAzureList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProfileAzure, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureList. +func (in *ProfileAzureList) DeepCopy() *ProfileAzureList { + if in == nil { + return nil + } + out := new(ProfileAzureList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileAzureList) 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 *ProfileAzureObservation) DeepCopyInto(out *ProfileAzureObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.DataDiskCaching != nil { + in, out := &in.DataDiskCaching, &out.DataDiskCaching + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskType != nil { + in, out := &in.DiskType, &out.DiskType + *out = new(string) + **out = **in + } + if in.ExternalRegionID != nil { + in, out := &in.ExternalRegionID, &out.ExternalRegionID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Links != nil { + in, out := &in.Links, &out.Links + *out = make([]ProfileAzureLinksObservation, 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.OrganizationID != nil { + in, out := &in.OrganizationID, &out.OrganizationID + *out = new(string) + **out = **in + } + if in.OsDiskCaching != nil { + in, out := &in.OsDiskCaching, &out.OsDiskCaching + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.StorageAccountID != nil { + in, out := &in.StorageAccountID, &out.StorageAccountID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileAzureTagsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureObservation. +func (in *ProfileAzureObservation) DeepCopy() *ProfileAzureObservation { + if in == nil { + return nil + } + out := new(ProfileAzureObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureParameters) DeepCopyInto(out *ProfileAzureParameters) { + *out = *in + if in.DataDiskCaching != nil { + in, out := &in.DataDiskCaching, &out.DataDiskCaching + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskType != nil { + in, out := &in.DiskType, &out.DiskType + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.OsDiskCaching != nil { + in, out := &in.OsDiskCaching, &out.OsDiskCaching + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.StorageAccountID != nil { + in, out := &in.StorageAccountID, &out.StorageAccountID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileAzureTagsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureParameters. +func (in *ProfileAzureParameters) DeepCopy() *ProfileAzureParameters { + if in == nil { + return nil + } + out := new(ProfileAzureParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureSpec) DeepCopyInto(out *ProfileAzureSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureSpec. +func (in *ProfileAzureSpec) DeepCopy() *ProfileAzureSpec { + if in == nil { + return nil + } + out := new(ProfileAzureSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureStatus) DeepCopyInto(out *ProfileAzureStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileAzureStatus. +func (in *ProfileAzureStatus) DeepCopy() *ProfileAzureStatus { + if in == nil { + return nil + } + out := new(ProfileAzureStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureTagsObservation) DeepCopyInto(out *ProfileAzureTagsObservation) { + *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 ProfileAzureTagsObservation. +func (in *ProfileAzureTagsObservation) DeepCopy() *ProfileAzureTagsObservation { + if in == nil { + return nil + } + out := new(ProfileAzureTagsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileAzureTagsParameters) DeepCopyInto(out *ProfileAzureTagsParameters) { + *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 ProfileAzureTagsParameters. +func (in *ProfileAzureTagsParameters) DeepCopy() *ProfileAzureTagsParameters { + if in == nil { + return nil + } + out := new(ProfileAzureTagsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileList) DeepCopyInto(out *ProfileList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Profile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileList. +func (in *ProfileList) DeepCopy() *ProfileList { + if in == nil { + return nil + } + out := new(ProfileList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileList) 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 *ProfileObservation) DeepCopyInto(out *ProfileObservation) { + *out = *in + if in.CloudAccountID != nil { + in, out := &in.CloudAccountID, &out.CloudAccountID + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskProperties != nil { + in, out := &in.DiskProperties, &out.DiskProperties + *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.DiskTargetProperties != nil { + in, out := &in.DiskTargetProperties, &out.DiskTargetProperties + *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.ExternalRegionID != nil { + in, out := &in.ExternalRegionID, &out.ExternalRegionID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Links != nil { + in, out := &in.Links, &out.Links + *out = make([]LinksObservation, 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.OrgID != nil { + in, out := &in.OrgID, &out.OrgID + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]TagsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileObservation. +func (in *ProfileObservation) DeepCopy() *ProfileObservation { + if in == nil { + return nil + } + out := new(ProfileObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileParameters) DeepCopyInto(out *ProfileParameters) { + *out = *in + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskProperties != nil { + in, out := &in.DiskProperties, &out.DiskProperties + *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.DiskTargetProperties != nil { + in, out := &in.DiskTargetProperties, &out.DiskTargetProperties + *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.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]TagsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileParameters. +func (in *ProfileParameters) DeepCopy() *ProfileParameters { + if in == nil { + return nil + } + out := new(ProfileParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileSpec) DeepCopyInto(out *ProfileSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileSpec. +func (in *ProfileSpec) DeepCopy() *ProfileSpec { + if in == nil { + return nil + } + out := new(ProfileSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileStatus) DeepCopyInto(out *ProfileStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileStatus. +func (in *ProfileStatus) DeepCopy() *ProfileStatus { + if in == nil { + return nil + } + out := new(ProfileStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphere) DeepCopyInto(out *ProfileVsphere) { + *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 ProfileVsphere. +func (in *ProfileVsphere) DeepCopy() *ProfileVsphere { + if in == nil { + return nil + } + out := new(ProfileVsphere) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileVsphere) 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 *ProfileVsphereLinksObservation) DeepCopyInto(out *ProfileVsphereLinksObservation) { + *out = *in + if in.Href != nil { + in, out := &in.Href, &out.Href + *out = new(string) + **out = **in + } + if in.Hrefs != nil { + in, out := &in.Hrefs, &out.Hrefs + *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.Rel != nil { + in, out := &in.Rel, &out.Rel + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereLinksObservation. +func (in *ProfileVsphereLinksObservation) DeepCopy() *ProfileVsphereLinksObservation { + if in == nil { + return nil + } + out := new(ProfileVsphereLinksObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereLinksParameters) DeepCopyInto(out *ProfileVsphereLinksParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereLinksParameters. +func (in *ProfileVsphereLinksParameters) DeepCopy() *ProfileVsphereLinksParameters { + if in == nil { + return nil + } + out := new(ProfileVsphereLinksParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereList) DeepCopyInto(out *ProfileVsphereList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ProfileVsphere, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereList. +func (in *ProfileVsphereList) DeepCopy() *ProfileVsphereList { + if in == nil { + return nil + } + out := new(ProfileVsphereList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProfileVsphereList) 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 *ProfileVsphereObservation) DeepCopyInto(out *ProfileVsphereObservation) { + *out = *in + if in.CloudAccountID != nil { + in, out := &in.CloudAccountID, &out.CloudAccountID + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.DatastoreID != nil { + in, out := &in.DatastoreID, &out.DatastoreID + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskMode != nil { + in, out := &in.DiskMode, &out.DiskMode + *out = new(string) + **out = **in + } + if in.DiskType != nil { + in, out := &in.DiskType, &out.DiskType + *out = new(string) + **out = **in + } + if in.ExternalRegionID != nil { + in, out := &in.ExternalRegionID, &out.ExternalRegionID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.LimitIops != nil { + in, out := &in.LimitIops, &out.LimitIops + *out = new(string) + **out = **in + } + if in.Links != nil { + in, out := &in.Links, &out.Links + *out = make([]ProfileVsphereLinksObservation, 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.OrgID != nil { + in, out := &in.OrgID, &out.OrgID + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.ProvisioningType != nil { + in, out := &in.ProvisioningType, &out.ProvisioningType + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.Shares != nil { + in, out := &in.Shares, &out.Shares + *out = new(string) + **out = **in + } + if in.SharesLevel != nil { + in, out := &in.SharesLevel, &out.SharesLevel + *out = new(string) + **out = **in + } + if in.StoragePolicyID != nil { + in, out := &in.StoragePolicyID, &out.StoragePolicyID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileVsphereTagsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereObservation. +func (in *ProfileVsphereObservation) DeepCopy() *ProfileVsphereObservation { + if in == nil { + return nil + } + out := new(ProfileVsphereObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereParameters) DeepCopyInto(out *ProfileVsphereParameters) { + *out = *in + if in.DatastoreID != nil { + in, out := &in.DatastoreID, &out.DatastoreID + *out = new(string) + **out = **in + } + if in.DefaultItem != nil { + in, out := &in.DefaultItem, &out.DefaultItem + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DiskMode != nil { + in, out := &in.DiskMode, &out.DiskMode + *out = new(string) + **out = **in + } + if in.DiskType != nil { + in, out := &in.DiskType, &out.DiskType + *out = new(string) + **out = **in + } + if in.LimitIops != nil { + in, out := &in.LimitIops, &out.LimitIops + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ProvisioningType != nil { + in, out := &in.ProvisioningType, &out.ProvisioningType + *out = new(string) + **out = **in + } + if in.RegionID != nil { + in, out := &in.RegionID, &out.RegionID + *out = new(string) + **out = **in + } + if in.Shares != nil { + in, out := &in.Shares, &out.Shares + *out = new(string) + **out = **in + } + if in.SharesLevel != nil { + in, out := &in.SharesLevel, &out.SharesLevel + *out = new(string) + **out = **in + } + if in.StoragePolicyID != nil { + in, out := &in.StoragePolicyID, &out.StoragePolicyID + *out = new(string) + **out = **in + } + if in.SupportsEncryption != nil { + in, out := &in.SupportsEncryption, &out.SupportsEncryption + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ProfileVsphereTagsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereParameters. +func (in *ProfileVsphereParameters) DeepCopy() *ProfileVsphereParameters { + if in == nil { + return nil + } + out := new(ProfileVsphereParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereSpec) DeepCopyInto(out *ProfileVsphereSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereSpec. +func (in *ProfileVsphereSpec) DeepCopy() *ProfileVsphereSpec { + if in == nil { + return nil + } + out := new(ProfileVsphereSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereStatus) DeepCopyInto(out *ProfileVsphereStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileVsphereStatus. +func (in *ProfileVsphereStatus) DeepCopy() *ProfileVsphereStatus { + if in == nil { + return nil + } + out := new(ProfileVsphereStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereTagsObservation) DeepCopyInto(out *ProfileVsphereTagsObservation) { + *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 ProfileVsphereTagsObservation. +func (in *ProfileVsphereTagsObservation) DeepCopy() *ProfileVsphereTagsObservation { + if in == nil { + return nil + } + out := new(ProfileVsphereTagsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProfileVsphereTagsParameters) DeepCopyInto(out *ProfileVsphereTagsParameters) { + *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 ProfileVsphereTagsParameters. +func (in *ProfileVsphereTagsParameters) DeepCopy() *ProfileVsphereTagsParameters { + if in == nil { + return nil + } + out := new(ProfileVsphereTagsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagsObservation) DeepCopyInto(out *TagsObservation) { + *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 TagsObservation. +func (in *TagsObservation) DeepCopy() *TagsObservation { + if in == nil { + return nil + } + out := new(TagsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagsParameters) DeepCopyInto(out *TagsParameters) { + *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 TagsParameters. +func (in *TagsParameters) DeepCopy() *TagsParameters { + if in == nil { + return nil + } + out := new(TagsParameters) + in.DeepCopyInto(out) + return out +} diff --git a/apis/storage/v1alpha1/zz_generated.managed.go b/apis/storage/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..8c5efcc --- /dev/null +++ b/apis/storage/v1alpha1/zz_generated.managed.go @@ -0,0 +1,312 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Profile. +func (mg *Profile) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Profile. +func (mg *Profile) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicy of this Profile. +func (mg *Profile) GetManagementPolicy() xpv1.ManagementPolicy { + return mg.Spec.ManagementPolicy +} + +// GetProviderConfigReference of this Profile. +func (mg *Profile) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this Profile. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *Profile) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this Profile. +func (mg *Profile) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Profile. +func (mg *Profile) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Profile. +func (mg *Profile) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Profile. +func (mg *Profile) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicy of this Profile. +func (mg *Profile) SetManagementPolicy(r xpv1.ManagementPolicy) { + mg.Spec.ManagementPolicy = r +} + +// SetProviderConfigReference of this Profile. +func (mg *Profile) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this Profile. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *Profile) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this Profile. +func (mg *Profile) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Profile. +func (mg *Profile) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this ProfileAws. +func (mg *ProfileAws) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ProfileAws. +func (mg *ProfileAws) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicy of this ProfileAws. +func (mg *ProfileAws) GetManagementPolicy() xpv1.ManagementPolicy { + return mg.Spec.ManagementPolicy +} + +// GetProviderConfigReference of this ProfileAws. +func (mg *ProfileAws) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this ProfileAws. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *ProfileAws) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this ProfileAws. +func (mg *ProfileAws) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ProfileAws. +func (mg *ProfileAws) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ProfileAws. +func (mg *ProfileAws) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ProfileAws. +func (mg *ProfileAws) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicy of this ProfileAws. +func (mg *ProfileAws) SetManagementPolicy(r xpv1.ManagementPolicy) { + mg.Spec.ManagementPolicy = r +} + +// SetProviderConfigReference of this ProfileAws. +func (mg *ProfileAws) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this ProfileAws. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *ProfileAws) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this ProfileAws. +func (mg *ProfileAws) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ProfileAws. +func (mg *ProfileAws) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this ProfileAzure. +func (mg *ProfileAzure) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ProfileAzure. +func (mg *ProfileAzure) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicy of this ProfileAzure. +func (mg *ProfileAzure) GetManagementPolicy() xpv1.ManagementPolicy { + return mg.Spec.ManagementPolicy +} + +// GetProviderConfigReference of this ProfileAzure. +func (mg *ProfileAzure) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this ProfileAzure. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *ProfileAzure) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this ProfileAzure. +func (mg *ProfileAzure) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ProfileAzure. +func (mg *ProfileAzure) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ProfileAzure. +func (mg *ProfileAzure) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ProfileAzure. +func (mg *ProfileAzure) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicy of this ProfileAzure. +func (mg *ProfileAzure) SetManagementPolicy(r xpv1.ManagementPolicy) { + mg.Spec.ManagementPolicy = r +} + +// SetProviderConfigReference of this ProfileAzure. +func (mg *ProfileAzure) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this ProfileAzure. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *ProfileAzure) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this ProfileAzure. +func (mg *ProfileAzure) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ProfileAzure. +func (mg *ProfileAzure) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this ProfileVsphere. +func (mg *ProfileVsphere) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ProfileVsphere. +func (mg *ProfileVsphere) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicy of this ProfileVsphere. +func (mg *ProfileVsphere) GetManagementPolicy() xpv1.ManagementPolicy { + return mg.Spec.ManagementPolicy +} + +// GetProviderConfigReference of this ProfileVsphere. +func (mg *ProfileVsphere) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this ProfileVsphere. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *ProfileVsphere) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this ProfileVsphere. +func (mg *ProfileVsphere) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ProfileVsphere. +func (mg *ProfileVsphere) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ProfileVsphere. +func (mg *ProfileVsphere) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ProfileVsphere. +func (mg *ProfileVsphere) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicy of this ProfileVsphere. +func (mg *ProfileVsphere) SetManagementPolicy(r xpv1.ManagementPolicy) { + mg.Spec.ManagementPolicy = r +} + +// SetProviderConfigReference of this ProfileVsphere. +func (mg *ProfileVsphere) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this ProfileVsphere. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *ProfileVsphere) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this ProfileVsphere. +func (mg *ProfileVsphere) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ProfileVsphere. +func (mg *ProfileVsphere) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/storage/v1alpha1/zz_generated.managedlist.go b/apis/storage/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..27c7bfc --- /dev/null +++ b/apis/storage/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,44 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this ProfileAwsList. +func (l *ProfileAwsList) 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 ProfileAzureList. +func (l *ProfileAzureList) 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 ProfileList. +func (l *ProfileList) 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 ProfileVsphereList. +func (l *ProfileVsphereList) 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/storage/v1alpha1/zz_generated_terraformed.go b/apis/storage/v1alpha1/zz_generated_terraformed.go new file mode 100755 index 0000000..20f3d81 --- /dev/null +++ b/apis/storage/v1alpha1/zz_generated_terraformed.go @@ -0,0 +1,310 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/pkg/errors" + + "github.com/upbound/upjet/pkg/resource" + "github.com/upbound/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Profile +func (mg *Profile) GetTerraformResourceType() string { + return "vra_storage_profile" +} + +// GetConnectionDetailsMapping for this Profile +func (tr *Profile) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Profile +func (tr *Profile) 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 Profile +func (tr *Profile) 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 Profile +func (tr *Profile) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Profile +func (tr *Profile) 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 Profile +func (tr *Profile) 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) +} + +// LateInitialize this Profile using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Profile) LateInitialize(attrs []byte) (bool, error) { + params := &ProfileParameters{} + 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 *Profile) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this ProfileAws +func (mg *ProfileAws) GetTerraformResourceType() string { + return "vra_storage_profile_aws" +} + +// GetConnectionDetailsMapping for this ProfileAws +func (tr *ProfileAws) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ProfileAws +func (tr *ProfileAws) 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 ProfileAws +func (tr *ProfileAws) 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 ProfileAws +func (tr *ProfileAws) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ProfileAws +func (tr *ProfileAws) 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 ProfileAws +func (tr *ProfileAws) 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) +} + +// LateInitialize this ProfileAws using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ProfileAws) LateInitialize(attrs []byte) (bool, error) { + params := &ProfileAwsParameters{} + 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 *ProfileAws) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this ProfileAzure +func (mg *ProfileAzure) GetTerraformResourceType() string { + return "vra_storage_profile_azure" +} + +// GetConnectionDetailsMapping for this ProfileAzure +func (tr *ProfileAzure) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ProfileAzure +func (tr *ProfileAzure) 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 ProfileAzure +func (tr *ProfileAzure) 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 ProfileAzure +func (tr *ProfileAzure) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ProfileAzure +func (tr *ProfileAzure) 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 ProfileAzure +func (tr *ProfileAzure) 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) +} + +// LateInitialize this ProfileAzure using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ProfileAzure) LateInitialize(attrs []byte) (bool, error) { + params := &ProfileAzureParameters{} + 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 *ProfileAzure) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this ProfileVsphere +func (mg *ProfileVsphere) GetTerraformResourceType() string { + return "vra_storage_profile_vsphere" +} + +// GetConnectionDetailsMapping for this ProfileVsphere +func (tr *ProfileVsphere) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ProfileVsphere +func (tr *ProfileVsphere) 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 ProfileVsphere +func (tr *ProfileVsphere) 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 ProfileVsphere +func (tr *ProfileVsphere) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ProfileVsphere +func (tr *ProfileVsphere) 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 ProfileVsphere +func (tr *ProfileVsphere) 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) +} + +// LateInitialize this ProfileVsphere using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ProfileVsphere) LateInitialize(attrs []byte) (bool, error) { + params := &ProfileVsphereParameters{} + 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 *ProfileVsphere) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/storage/v1alpha1/zz_groupversion_info.go b/apis/storage/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..e290654 --- /dev/null +++ b/apis/storage/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,32 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=storage.crossplane.io +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "storage.crossplane.io" + 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/storage/v1alpha1/zz_profile_types.go b/apis/storage/v1alpha1/zz_profile_types.go new file mode 100755 index 0000000..4273834 --- /dev/null +++ b/apis/storage/v1alpha1/zz_profile_types.go @@ -0,0 +1,174 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// 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 LinksObservation struct { + Href *string `json:"href,omitempty" tf:"href,omitempty"` + + Hrefs []*string `json:"hrefs,omitempty" tf:"hrefs,omitempty"` + + Rel *string `json:"rel,omitempty" tf:"rel,omitempty"` +} + +type LinksParameters struct { +} + +type ProfileObservation struct { + + // Id of the cloud account this storage profile belongs to. + CloudAccountID *string `json:"cloudAccountId,omitempty" tf:"cloud_account_id,omitempty"` + + // Date when the entity was created. The date is in ISO 8601 and UTC. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Indicates if this storage profile is a default profile. + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // A human-friendly description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Map of storage properties that are to be applied on disk while provisioning. + DiskProperties map[string]*string `json:"diskProperties,omitempty" tf:"disk_properties,omitempty"` + + // Map of storage placements to know where the disk is provisioned. + DiskTargetProperties map[string]*string `json:"diskTargetProperties,omitempty" tf:"disk_target_properties,omitempty"` + + // The id of the region as seen in the cloud provider for which this profile is defined. + ExternalRegionID *string `json:"externalRegionId,omitempty" tf:"external_region_id,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + Links []LinksObservation `json:"links,omitempty" tf:"links,omitempty"` + + // A human-friendly name for storage profile. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The id of the organization this entity belongs to. + OrgID *string `json:"orgId,omitempty" tf:"org_id,omitempty"` + + // Email of the user that owns the entity. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // The id of the region that is associated with the storage profile. + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + Tags []TagsObservation `json:"tags,omitempty" tf:"tags,omitempty"` + + // Date when the entity was last updated. The date is ISO 8601 and UTC. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type ProfileParameters struct { + + // Indicates if this storage profile is a default profile. + // +kubebuilder:validation:Optional + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // A human-friendly description. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Map of storage properties that are to be applied on disk while provisioning. + // +kubebuilder:validation:Optional + DiskProperties map[string]*string `json:"diskProperties,omitempty" tf:"disk_properties,omitempty"` + + // Map of storage placements to know where the disk is provisioned. + // +kubebuilder:validation:Optional + DiskTargetProperties map[string]*string `json:"diskTargetProperties,omitempty" tf:"disk_target_properties,omitempty"` + + // A human-friendly name for storage profile. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The id of the region that is associated with the storage profile. + // +kubebuilder:validation:Optional + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + // +kubebuilder:validation:Optional + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + // +kubebuilder:validation:Optional + Tags []TagsParameters `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type TagsObservation struct { + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type TagsParameters struct { + + // +kubebuilder:validation:Required + Key *string `json:"key" tf:"key,omitempty"` + + // +kubebuilder:validation:Required + Value *string `json:"value" tf:"value,omitempty"` +} + +// ProfileSpec defines the desired state of Profile +type ProfileSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ProfileParameters `json:"forProvider"` +} + +// ProfileStatus defines the observed state of Profile. +type ProfileStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ProfileObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Profile is the Schema for the Profiles API. +// +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,vra} +type Profile struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem)",message="defaultItem 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.regionId)",message="regionId is a required parameter" + Spec ProfileSpec `json:"spec"` + Status ProfileStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileList contains a list of Profiles +type ProfileList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Profile `json:"items"` +} + +// Repository type metadata. +var ( + Profile_Kind = "Profile" + Profile_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Profile_Kind}.String() + Profile_KindAPIVersion = Profile_Kind + "." + CRDGroupVersion.String() + Profile_GroupVersionKind = CRDGroupVersion.WithKind(Profile_Kind) +) + +func init() { + SchemeBuilder.Register(&Profile{}, &ProfileList{}) +} diff --git a/apis/storage/v1alpha1/zz_profileaws_types.go b/apis/storage/v1alpha1/zz_profileaws_types.go new file mode 100755 index 0000000..1a03b71 --- /dev/null +++ b/apis/storage/v1alpha1/zz_profileaws_types.go @@ -0,0 +1,156 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// 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 ProfileAwsLinksObservation struct { + Href *string `json:"href,omitempty" tf:"href,omitempty"` + + Hrefs []*string `json:"hrefs,omitempty" tf:"hrefs,omitempty"` + + Rel *string `json:"rel,omitempty" tf:"rel,omitempty"` +} + +type ProfileAwsLinksParameters struct { +} + +type ProfileAwsObservation struct { + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + DeviceType *string `json:"deviceType,omitempty" tf:"device_type,omitempty"` + + ExternalRegionID *string `json:"externalRegionId,omitempty" tf:"external_region_id,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + Iops *string `json:"iops,omitempty" tf:"iops,omitempty"` + + Links []ProfileAwsLinksObservation `json:"links,omitempty" tf:"links,omitempty"` + + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + OrganizationID *string `json:"organizationId,omitempty" tf:"organization_id,omitempty"` + + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + Tags []ProfileAwsTagsObservation `json:"tags,omitempty" tf:"tags,omitempty"` + + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` + + VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"` +} + +type ProfileAwsParameters struct { + + // +kubebuilder:validation:Optional + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // +kubebuilder:validation:Optional + DeviceType *string `json:"deviceType,omitempty" tf:"device_type,omitempty"` + + // +kubebuilder:validation:Optional + Iops *string `json:"iops,omitempty" tf:"iops,omitempty"` + + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // +kubebuilder:validation:Optional + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // +kubebuilder:validation:Optional + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + // +kubebuilder:validation:Optional + Tags []ProfileAwsTagsParameters `json:"tags,omitempty" tf:"tags,omitempty"` + + // +kubebuilder:validation:Optional + VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"` +} + +type ProfileAwsTagsObservation struct { + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ProfileAwsTagsParameters struct { + + // +kubebuilder:validation:Required + Key *string `json:"key" tf:"key,omitempty"` + + // +kubebuilder:validation:Required + Value *string `json:"value" tf:"value,omitempty"` +} + +// ProfileAwsSpec defines the desired state of ProfileAws +type ProfileAwsSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ProfileAwsParameters `json:"forProvider"` +} + +// ProfileAwsStatus defines the observed state of ProfileAws. +type ProfileAwsStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ProfileAwsObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileAws is the Schema for the ProfileAwss API. +// +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,vra} +type ProfileAws struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem)",message="defaultItem 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.regionId)",message="regionId is a required parameter" + Spec ProfileAwsSpec `json:"spec"` + Status ProfileAwsStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileAwsList contains a list of ProfileAwss +type ProfileAwsList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProfileAws `json:"items"` +} + +// Repository type metadata. +var ( + ProfileAws_Kind = "ProfileAws" + ProfileAws_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ProfileAws_Kind}.String() + ProfileAws_KindAPIVersion = ProfileAws_Kind + "." + CRDGroupVersion.String() + ProfileAws_GroupVersionKind = CRDGroupVersion.WithKind(ProfileAws_Kind) +) + +func init() { + SchemeBuilder.Register(&ProfileAws{}, &ProfileAwsList{}) +} diff --git a/apis/storage/v1alpha1/zz_profileazure_types.go b/apis/storage/v1alpha1/zz_profileazure_types.go new file mode 100755 index 0000000..9d49636 --- /dev/null +++ b/apis/storage/v1alpha1/zz_profileazure_types.go @@ -0,0 +1,161 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// 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 ProfileAzureLinksObservation struct { + Href *string `json:"href,omitempty" tf:"href,omitempty"` + + Hrefs []*string `json:"hrefs,omitempty" tf:"hrefs,omitempty"` + + Rel *string `json:"rel,omitempty" tf:"rel,omitempty"` +} + +type ProfileAzureLinksParameters struct { +} + +type ProfileAzureObservation struct { + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + DataDiskCaching *string `json:"dataDiskCaching,omitempty" tf:"data_disk_caching,omitempty"` + + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` + + ExternalRegionID *string `json:"externalRegionId,omitempty" tf:"external_region_id,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + Links []ProfileAzureLinksObservation `json:"links,omitempty" tf:"links,omitempty"` + + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + OrganizationID *string `json:"organizationId,omitempty" tf:"organization_id,omitempty"` + + OsDiskCaching *string `json:"osDiskCaching,omitempty" tf:"os_disk_caching,omitempty"` + + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` + + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + Tags []ProfileAzureTagsObservation `json:"tags,omitempty" tf:"tags,omitempty"` + + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type ProfileAzureParameters struct { + + // +kubebuilder:validation:Optional + DataDiskCaching *string `json:"dataDiskCaching,omitempty" tf:"data_disk_caching,omitempty"` + + // +kubebuilder:validation:Optional + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // +kubebuilder:validation:Optional + DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` + + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // +kubebuilder:validation:Optional + OsDiskCaching *string `json:"osDiskCaching,omitempty" tf:"os_disk_caching,omitempty"` + + // +kubebuilder:validation:Optional + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // +kubebuilder:validation:Optional + StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` + + // +kubebuilder:validation:Optional + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + // +kubebuilder:validation:Optional + Tags []ProfileAzureTagsParameters `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type ProfileAzureTagsObservation struct { + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ProfileAzureTagsParameters struct { + + // +kubebuilder:validation:Required + Key *string `json:"key" tf:"key,omitempty"` + + // +kubebuilder:validation:Required + Value *string `json:"value" tf:"value,omitempty"` +} + +// ProfileAzureSpec defines the desired state of ProfileAzure +type ProfileAzureSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ProfileAzureParameters `json:"forProvider"` +} + +// ProfileAzureStatus defines the observed state of ProfileAzure. +type ProfileAzureStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ProfileAzureObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileAzure is the Schema for the ProfileAzures API. +// +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,vra} +type ProfileAzure struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem)",message="defaultItem 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.regionId)",message="regionId is a required parameter" + Spec ProfileAzureSpec `json:"spec"` + Status ProfileAzureStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileAzureList contains a list of ProfileAzures +type ProfileAzureList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProfileAzure `json:"items"` +} + +// Repository type metadata. +var ( + ProfileAzure_Kind = "ProfileAzure" + ProfileAzure_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ProfileAzure_Kind}.String() + ProfileAzure_KindAPIVersion = ProfileAzure_Kind + "." + CRDGroupVersion.String() + ProfileAzure_GroupVersionKind = CRDGroupVersion.WithKind(ProfileAzure_Kind) +) + +func init() { + SchemeBuilder.Register(&ProfileAzure{}, &ProfileAzureList{}) +} diff --git a/apis/storage/v1alpha1/zz_profilevsphere_types.go b/apis/storage/v1alpha1/zz_profilevsphere_types.go new file mode 100755 index 0000000..9bc6c9f --- /dev/null +++ b/apis/storage/v1alpha1/zz_profilevsphere_types.go @@ -0,0 +1,216 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// 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 ProfileVsphereLinksObservation struct { + Href *string `json:"href,omitempty" tf:"href,omitempty"` + + Hrefs []*string `json:"hrefs,omitempty" tf:"hrefs,omitempty"` + + Rel *string `json:"rel,omitempty" tf:"rel,omitempty"` +} + +type ProfileVsphereLinksParameters struct { +} + +type ProfileVsphereObservation struct { + + // Id of the cloud account this storage profile belongs to. + CloudAccountID *string `json:"cloudAccountId,omitempty" tf:"cloud_account_id,omitempty"` + + // Date when the entity was created. The date is in ISO 8601 and UTC. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Id of the vSphere Datastore for placing disk and VM. + DatastoreID *string `json:"datastoreId,omitempty" tf:"datastore_id,omitempty"` + + // Indicates if a storage profile acts as a default storage profile for a disk. + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // A human-friendly description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Type of mode for the disk. Omitting this value will set it to dependent. example: dependent / independent-persistent / independent-nonpersistent. + DiskMode *string `json:"diskMode,omitempty" tf:"disk_mode,omitempty"` + + // Disk types are specified as standard or first class, empty value is considered as standard. + DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` + + // The id of the region for which this profile is defined + ExternalRegionID *string `json:"externalRegionId,omitempty" tf:"external_region_id,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The upper bound for the I/O operations per second allocated for each virtual disk. + LimitIops *string `json:"limitIops,omitempty" tf:"limit_iops,omitempty"` + + Links []ProfileVsphereLinksObservation `json:"links,omitempty" tf:"links,omitempty"` + + // A human-friendly name used as an identifier in APIs that support this option. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The id of the organization this entity belongs to. + OrgID *string `json:"orgId,omitempty" tf:"org_id,omitempty"` + + // Email of the user that owns the entity. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // Type of provisioning policy for the disk. + ProvisioningType *string `json:"provisioningType,omitempty" tf:"provisioning_type,omitempty"` + + // The Id of the region that is associated with the storage profile. + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // A specific number of shares assigned to each virtual machine. + Shares *string `json:"shares,omitempty" tf:"shares,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + SharesLevel *string `json:"sharesLevel,omitempty" tf:"shares_level,omitempty"` + + // Id of the vSphere Storage Policy to be applied. + StoragePolicyID *string `json:"storagePolicyId,omitempty" tf:"storage_policy_id,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + Tags []ProfileVsphereTagsObservation `json:"tags,omitempty" tf:"tags,omitempty"` + + // Date when the entity was last updated. The date is ISO 8601 and UTC. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type ProfileVsphereParameters struct { + + // Id of the vSphere Datastore for placing disk and VM. + // +kubebuilder:validation:Optional + DatastoreID *string `json:"datastoreId,omitempty" tf:"datastore_id,omitempty"` + + // Indicates if a storage profile acts as a default storage profile for a disk. + // +kubebuilder:validation:Optional + DefaultItem *bool `json:"defaultItem,omitempty" tf:"default_item,omitempty"` + + // A human-friendly description. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Type of mode for the disk. Omitting this value will set it to dependent. example: dependent / independent-persistent / independent-nonpersistent. + // +kubebuilder:validation:Optional + DiskMode *string `json:"diskMode,omitempty" tf:"disk_mode,omitempty"` + + // Disk types are specified as standard or first class, empty value is considered as standard. + // +kubebuilder:validation:Optional + DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` + + // The upper bound for the I/O operations per second allocated for each virtual disk. + // +kubebuilder:validation:Optional + LimitIops *string `json:"limitIops,omitempty" tf:"limit_iops,omitempty"` + + // A human-friendly name used as an identifier in APIs that support this option. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Type of provisioning policy for the disk. + // +kubebuilder:validation:Optional + ProvisioningType *string `json:"provisioningType,omitempty" tf:"provisioning_type,omitempty"` + + // The Id of the region that is associated with the storage profile. + // +kubebuilder:validation:Optional + RegionID *string `json:"regionId,omitempty" tf:"region_id,omitempty"` + + // A specific number of shares assigned to each virtual machine. + // +kubebuilder:validation:Optional + Shares *string `json:"shares,omitempty" tf:"shares,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + // +kubebuilder:validation:Optional + SharesLevel *string `json:"sharesLevel,omitempty" tf:"shares_level,omitempty"` + + // Id of the vSphere Storage Policy to be applied. + // +kubebuilder:validation:Optional + StoragePolicyID *string `json:"storagePolicyId,omitempty" tf:"storage_policy_id,omitempty"` + + // Indicates whether this storage profile supports encryption or not. + // +kubebuilder:validation:Optional + SupportsEncryption *bool `json:"supportsEncryption,omitempty" tf:"supports_encryption,omitempty"` + + // +kubebuilder:validation:Optional + Tags []ProfileVsphereTagsParameters `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type ProfileVsphereTagsObservation struct { + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ProfileVsphereTagsParameters struct { + + // +kubebuilder:validation:Required + Key *string `json:"key" tf:"key,omitempty"` + + // +kubebuilder:validation:Required + Value *string `json:"value" tf:"value,omitempty"` +} + +// ProfileVsphereSpec defines the desired state of ProfileVsphere +type ProfileVsphereSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ProfileVsphereParameters `json:"forProvider"` +} + +// ProfileVsphereStatus defines the observed state of ProfileVsphere. +type ProfileVsphereStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ProfileVsphereObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileVsphere is the Schema for the ProfileVspheres API. +// +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,vra} +type ProfileVsphere struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem)",message="defaultItem 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.regionId)",message="regionId is a required parameter" + Spec ProfileVsphereSpec `json:"spec"` + Status ProfileVsphereStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProfileVsphereList contains a list of ProfileVspheres +type ProfileVsphereList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ProfileVsphere `json:"items"` +} + +// Repository type metadata. +var ( + ProfileVsphere_Kind = "ProfileVsphere" + ProfileVsphere_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ProfileVsphere_Kind}.String() + ProfileVsphere_KindAPIVersion = ProfileVsphere_Kind + "." + CRDGroupVersion.String() + ProfileVsphere_GroupVersionKind = CRDGroupVersion.WithKind(ProfileVsphere_Kind) +) + +func init() { + SchemeBuilder.Register(&ProfileVsphere{}, &ProfileVsphereList{}) +} diff --git a/apis/zz_register.go b/apis/zz_register.go index e7cb233..c5e7a99 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -17,6 +17,7 @@ import ( v1alpha1flavorprofile "github.com/ankasoftco/upjet-provider-vra/apis/flavorprofile/v1alpha1" v1alpha1imageprofile "github.com/ankasoftco/upjet-provider-vra/apis/imageprofile/v1alpha1" v1alpha1project "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1" + v1alpha1storage "github.com/ankasoftco/upjet-provider-vra/apis/storage/v1alpha1" v1alpha1apis "github.com/ankasoftco/upjet-provider-vra/apis/v1alpha1" v1beta1 "github.com/ankasoftco/upjet-provider-vra/apis/v1beta1" ) @@ -26,12 +27,12 @@ func init() { AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, v1alpha1blueprint.SchemeBuilder.AddToScheme, - v1alpha1blueprint.SchemeBuilder.AddToScheme, v1alpha1deployment.SchemeBuilder.AddToScheme, v1alpha1fabric.SchemeBuilder.AddToScheme, v1alpha1flavorprofile.SchemeBuilder.AddToScheme, v1alpha1imageprofile.SchemeBuilder.AddToScheme, v1alpha1project.SchemeBuilder.AddToScheme, + v1alpha1storage.SchemeBuilder.AddToScheme, v1alpha1apis.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme, ) diff --git a/config/blueprint/config.go b/config/blueprint/config.go index 6b4b4e5..1a84ebc 100644 --- a/config/blueprint/config.go +++ b/config/blueprint/config.go @@ -15,7 +15,7 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("vra_blueprint_version", func(r *config.Resource) { - r.ShortGroup = "blueprint.version" + r.ShortGroup = "blueprint" r.Version = "v1alpha1" r.References["blueprint_id"] = config.Reference{ Type: "Blueprint", //github.com/crossplane-contrib/upjet-provider-vra/apis/blueprint/v1alpha1.Blueprint diff --git a/config/external_name.go b/config/external_name.go index 6dc7a32..cc0c791 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -19,6 +19,10 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "vra_fabric_network_vsphere": config.IdentifierFromProvider, "vra_flavor_profile": config.IdentifierFromProvider, "vra_image_profile": config.IdentifierFromProvider, + "vra_storage_profile": config.IdentifierFromProvider, + "vra_storage_profile_aws": config.IdentifierFromProvider, + "vra_storage_profile_azure": config.IdentifierFromProvider, + "vra_storage_profile_vsphere": config.IdentifierFromProvider, "vra_block_device": config.IdentifierFromProvider, "vra_block_device_snapshot": config.IdentifierFromProvider, } diff --git a/config/provider.go b/config/provider.go index 905415d..d50903a 100644 --- a/config/provider.go +++ b/config/provider.go @@ -18,6 +18,7 @@ import ( flavorProfile "github.com/ankasoftco/upjet-provider-vra/config/flavor_profile" imageProfile "github.com/ankasoftco/upjet-provider-vra/config/image_profile" project "github.com/ankasoftco/upjet-provider-vra/config/project" + storage "github.com/ankasoftco/upjet-provider-vra/config/storage" ) const ( @@ -50,6 +51,7 @@ func GetProvider() *ujconfig.Provider { blockDevice.Configure, flavorProfile.Configure, imageProfile.Configure, + storage.Configure, } { configure(pc) } diff --git a/config/storage/config.go b/config/storage/config.go new file mode 100644 index 0000000..ee2c886 --- /dev/null +++ b/config/storage/config.go @@ -0,0 +1,30 @@ +package storage + +import "github.com/upbound/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("vra_storage_profile", func(r *config.Resource) { + + r.ShortGroup = "storage" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("vra_storage_profile_aws", func(r *config.Resource) { + + r.ShortGroup = "storage" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("vra_storage_profile_azure", func(r *config.Resource) { + + r.ShortGroup = "storage" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("vra_storage_profile_vsphere", func(r *config.Resource) { + + r.ShortGroup = "storage" + r.Version = "v1alpha1" + }) +} diff --git a/internal/controller/storage/profile/zz_controller.go b/internal/controller/storage/profile/zz_controller.go new file mode 100755 index 0000000..a3d62d0 --- /dev/null +++ b/internal/controller/storage/profile/zz_controller.go @@ -0,0 +1,55 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +package profile + +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/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/storage/v1alpha1" + features "github.com/ankasoftco/upjet-provider-vra/internal/features" +) + +// Setup adds a controller that reconciles Profile managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Profile_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)) + } + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["vra_storage_profile"], tjcontroller.WithLogger(o.Logger), + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Profile_GroupVersionKind))), + )), + 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.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Profile_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1alpha1.Profile{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/storage/profileaws/zz_controller.go b/internal/controller/storage/profileaws/zz_controller.go new file mode 100755 index 0000000..6f97a60 --- /dev/null +++ b/internal/controller/storage/profileaws/zz_controller.go @@ -0,0 +1,55 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +package profileaws + +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/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/storage/v1alpha1" + features "github.com/ankasoftco/upjet-provider-vra/internal/features" +) + +// Setup adds a controller that reconciles ProfileAws managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.ProfileAws_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)) + } + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["vra_storage_profile_aws"], tjcontroller.WithLogger(o.Logger), + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProfileAws_GroupVersionKind))), + )), + 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.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProfileAws_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1alpha1.ProfileAws{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/storage/profileazure/zz_controller.go b/internal/controller/storage/profileazure/zz_controller.go new file mode 100755 index 0000000..378199a --- /dev/null +++ b/internal/controller/storage/profileazure/zz_controller.go @@ -0,0 +1,55 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +package profileazure + +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/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/storage/v1alpha1" + features "github.com/ankasoftco/upjet-provider-vra/internal/features" +) + +// Setup adds a controller that reconciles ProfileAzure managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.ProfileAzure_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)) + } + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["vra_storage_profile_azure"], tjcontroller.WithLogger(o.Logger), + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProfileAzure_GroupVersionKind))), + )), + 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.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProfileAzure_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1alpha1.ProfileAzure{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/storage/profilevsphere/zz_controller.go b/internal/controller/storage/profilevsphere/zz_controller.go new file mode 100755 index 0000000..64befda --- /dev/null +++ b/internal/controller/storage/profilevsphere/zz_controller.go @@ -0,0 +1,55 @@ +/* +Copyright 2023 Upbound Inc. - ANKASOFT +*/ + +// Code generated by upjet. DO NOT EDIT. + +package profilevsphere + +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/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/storage/v1alpha1" + features "github.com/ankasoftco/upjet-provider-vra/internal/features" +) + +// Setup adds a controller that reconciles ProfileVsphere managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.ProfileVsphere_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)) + } + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["vra_storage_profile_vsphere"], tjcontroller.WithLogger(o.Logger), + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ProfileVsphere_GroupVersionKind))), + )), + 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.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ProfileVsphere_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1alpha1.ProfileVsphere{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index c09beb8..84c75e7 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -21,6 +21,10 @@ import ( profileimageprofile "github.com/ankasoftco/upjet-provider-vra/internal/controller/imageprofile/profile" project "github.com/ankasoftco/upjet-provider-vra/internal/controller/project/project" providerconfig "github.com/ankasoftco/upjet-provider-vra/internal/controller/providerconfig" + profilestorage "github.com/ankasoftco/upjet-provider-vra/internal/controller/storage/profile" + profileaws "github.com/ankasoftco/upjet-provider-vra/internal/controller/storage/profileaws" + profileazure "github.com/ankasoftco/upjet-provider-vra/internal/controller/storage/profileazure" + profilevsphere "github.com/ankasoftco/upjet-provider-vra/internal/controller/storage/profilevsphere" ) // Setup creates all controllers with the supplied logger and adds them to @@ -39,6 +43,10 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { profileimageprofile.Setup, project.Setup, providerconfig.Setup, + profilestorage.Setup, + profileaws.Setup, + profileazure.Setup, + profilevsphere.Setup, } { if err := setup(mgr, o); err != nil { return err diff --git a/package/crds/storage.crossplane.io_profileaws.yaml b/package/crds/storage.crossplane.io_profileaws.yaml new file mode 100644 index 0000000..50e5393 --- /dev/null +++ b/package/crds/storage.crossplane.io_profileaws.yaml @@ -0,0 +1,388 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: profileaws.storage.crossplane.io +spec: + group: storage.crossplane.io + names: + categories: + - crossplane + - managed + - vra + kind: ProfileAws + listKind: ProfileAwsList + plural: profileaws + singular: profileaws + 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: ProfileAws is the Schema for the ProfileAwss API. + 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: ProfileAwsSpec defines the desired state of ProfileAws + 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 ManagementPolicy 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: + defaultItem: + type: boolean + description: + type: string + deviceType: + type: string + iops: + type: string + name: + type: string + regionId: + type: string + supportsEncryption: + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + required: + - key + - value + type: object + type: array + volumeType: + 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 + 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 + 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 + 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: defaultItem is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem) + - message: name is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) + - message: regionId is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.regionId) + status: + description: ProfileAwsStatus defines the observed state of ProfileAws. + properties: + atProvider: + properties: + createdAt: + type: string + defaultItem: + type: boolean + description: + type: string + deviceType: + type: string + externalRegionId: + type: string + id: + type: string + iops: + type: string + links: + items: + properties: + href: + type: string + hrefs: + items: + type: string + type: array + rel: + type: string + type: object + type: array + name: + type: string + organizationId: + type: string + owner: + type: string + regionId: + type: string + supportsEncryption: + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + updatedAt: + type: string + volumeType: + 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 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/storage.crossplane.io_profileazures.yaml b/package/crds/storage.crossplane.io_profileazures.yaml new file mode 100644 index 0000000..faaf813 --- /dev/null +++ b/package/crds/storage.crossplane.io_profileazures.yaml @@ -0,0 +1,392 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: profileazures.storage.crossplane.io +spec: + group: storage.crossplane.io + names: + categories: + - crossplane + - managed + - vra + kind: ProfileAzure + listKind: ProfileAzureList + plural: profileazures + singular: profileazure + 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: ProfileAzure is the Schema for the ProfileAzures API. + 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: ProfileAzureSpec defines the desired state of ProfileAzure + 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 ManagementPolicy 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: + dataDiskCaching: + type: string + defaultItem: + type: boolean + description: + type: string + diskType: + type: string + name: + type: string + osDiskCaching: + type: string + regionId: + type: string + storageAccountId: + type: string + supportsEncryption: + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + required: + - key + - value + 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. + 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 + 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 + 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: defaultItem is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem) + - message: name is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) + - message: regionId is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.regionId) + status: + description: ProfileAzureStatus defines the observed state of ProfileAzure. + properties: + atProvider: + properties: + createdAt: + type: string + dataDiskCaching: + type: string + defaultItem: + type: boolean + description: + type: string + diskType: + type: string + externalRegionId: + type: string + id: + type: string + links: + items: + properties: + href: + type: string + hrefs: + items: + type: string + type: array + rel: + type: string + type: object + type: array + name: + type: string + organizationId: + type: string + osDiskCaching: + type: string + owner: + type: string + regionId: + type: string + storageAccountId: + type: string + supportsEncryption: + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + updatedAt: + 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 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/storage.crossplane.io_profiles.yaml b/package/crds/storage.crossplane.io_profiles.yaml new file mode 100644 index 0000000..e49176f --- /dev/null +++ b/package/crds/storage.crossplane.io_profiles.yaml @@ -0,0 +1,426 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: profiles.storage.crossplane.io +spec: + group: storage.crossplane.io + names: + categories: + - crossplane + - managed + - vra + kind: Profile + listKind: ProfileList + plural: profiles + singular: profile + 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: Profile is the Schema for the Profiles API. + 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: ProfileSpec defines the desired state of Profile + 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 ManagementPolicy 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: + defaultItem: + description: Indicates if this storage profile is a default profile. + type: boolean + description: + description: A human-friendly description. + type: string + diskProperties: + additionalProperties: + type: string + description: Map of storage properties that are to be applied + on disk while provisioning. + type: object + diskTargetProperties: + additionalProperties: + type: string + description: Map of storage placements to know where the disk + is provisioned. + type: object + name: + description: A human-friendly name for storage profile. + type: string + regionId: + description: The id of the region that is associated with the + storage profile. + type: string + supportsEncryption: + description: Indicates whether this storage profile supports encryption + or not. + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + required: + - key + - value + 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. + 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 + 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 + 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: defaultItem is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem) + - message: name is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) + - message: regionId is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.regionId) + status: + description: ProfileStatus defines the observed state of Profile. + properties: + atProvider: + properties: + cloudAccountId: + description: Id of the cloud account this storage profile belongs + to. + type: string + createdAt: + description: Date when the entity was created. The date is in + ISO 8601 and UTC. + type: string + defaultItem: + description: Indicates if this storage profile is a default profile. + type: boolean + description: + description: A human-friendly description. + type: string + diskProperties: + additionalProperties: + type: string + description: Map of storage properties that are to be applied + on disk while provisioning. + type: object + diskTargetProperties: + additionalProperties: + type: string + description: Map of storage placements to know where the disk + is provisioned. + type: object + externalRegionId: + description: The id of the region as seen in the cloud provider + for which this profile is defined. + type: string + id: + type: string + links: + items: + properties: + href: + type: string + hrefs: + items: + type: string + type: array + rel: + type: string + type: object + type: array + name: + description: A human-friendly name for storage profile. + type: string + orgId: + description: The id of the organization this entity belongs to. + type: string + owner: + description: Email of the user that owns the entity. + type: string + regionId: + description: The id of the region that is associated with the + storage profile. + type: string + supportsEncryption: + description: Indicates whether this storage profile supports encryption + or not. + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + updatedAt: + description: Date when the entity was last updated. The date is + ISO 8601 and UTC. + 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 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/storage.crossplane.io_profilevspheres.yaml b/package/crds/storage.crossplane.io_profilevspheres.yaml new file mode 100644 index 0000000..4c09875 --- /dev/null +++ b/package/crds/storage.crossplane.io_profilevspheres.yaml @@ -0,0 +1,468 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: profilevspheres.storage.crossplane.io +spec: + group: storage.crossplane.io + names: + categories: + - crossplane + - managed + - vra + kind: ProfileVsphere + listKind: ProfileVsphereList + plural: profilevspheres + singular: profilevsphere + 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: ProfileVsphere is the Schema for the ProfileVspheres API. + 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: ProfileVsphereSpec defines the desired state of ProfileVsphere + 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 ManagementPolicy 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: + datastoreId: + description: Id of the vSphere Datastore for placing disk and + VM. + type: string + defaultItem: + description: Indicates if a storage profile acts as a default + storage profile for a disk. + type: boolean + description: + description: A human-friendly description. + type: string + diskMode: + description: 'Type of mode for the disk. Omitting this value will + set it to dependent. example: dependent / independent-persistent + / independent-nonpersistent.' + type: string + diskType: + description: Disk types are specified as standard or first class, + empty value is considered as standard. + type: string + limitIops: + description: The upper bound for the I/O operations per second + allocated for each virtual disk. + type: string + name: + description: A human-friendly name used as an identifier in APIs + that support this option. + type: string + provisioningType: + description: Type of provisioning policy for the disk. + type: string + regionId: + description: The Id of the region that is associated with the + storage profile. + type: string + shares: + description: A specific number of shares assigned to each virtual + machine. + type: string + sharesLevel: + description: Indicates whether this storage profile supports encryption + or not. + type: string + storagePolicyId: + description: Id of the vSphere Storage Policy to be applied. + type: string + supportsEncryption: + description: Indicates whether this storage profile supports encryption + or not. + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + required: + - key + - value + 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. + 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 + 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 + 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: defaultItem is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.defaultItem) + - message: name is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name) + - message: regionId is a required parameter + rule: self.managementPolicy == 'ObserveOnly' || has(self.forProvider.regionId) + status: + description: ProfileVsphereStatus defines the observed state of ProfileVsphere. + properties: + atProvider: + properties: + cloudAccountId: + description: Id of the cloud account this storage profile belongs + to. + type: string + createdAt: + description: Date when the entity was created. The date is in + ISO 8601 and UTC. + type: string + datastoreId: + description: Id of the vSphere Datastore for placing disk and + VM. + type: string + defaultItem: + description: Indicates if a storage profile acts as a default + storage profile for a disk. + type: boolean + description: + description: A human-friendly description. + type: string + diskMode: + description: 'Type of mode for the disk. Omitting this value will + set it to dependent. example: dependent / independent-persistent + / independent-nonpersistent.' + type: string + diskType: + description: Disk types are specified as standard or first class, + empty value is considered as standard. + type: string + externalRegionId: + description: The id of the region for which this profile is defined + type: string + id: + type: string + limitIops: + description: The upper bound for the I/O operations per second + allocated for each virtual disk. + type: string + links: + items: + properties: + href: + type: string + hrefs: + items: + type: string + type: array + rel: + type: string + type: object + type: array + name: + description: A human-friendly name used as an identifier in APIs + that support this option. + type: string + orgId: + description: The id of the organization this entity belongs to. + type: string + owner: + description: Email of the user that owns the entity. + type: string + provisioningType: + description: Type of provisioning policy for the disk. + type: string + regionId: + description: The Id of the region that is associated with the + storage profile. + type: string + shares: + description: A specific number of shares assigned to each virtual + machine. + type: string + sharesLevel: + description: Indicates whether this storage profile supports encryption + or not. + type: string + storagePolicyId: + description: Id of the vSphere Storage Policy to be applied. + type: string + supportsEncryption: + description: Indicates whether this storage profile supports encryption + or not. + type: boolean + tags: + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + updatedAt: + description: Date when the entity was last updated. The date is + ISO 8601 and UTC. + 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 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}