From 9bfad5b437b13f541af3846ee692796b4e317763 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Tue, 4 Jun 2024 14:52:04 +0300 Subject: [PATCH 1/3] Bump upjet to commit f4f87bab8535 - Generate the secret references for the sensitive fields under the spec.initProvider API tree. Signed-off-by: Alper Rifat Ulucinar --- .../v1beta1/zz_certificate_terraformed.go | 2 +- .../v1beta1/zz_certificate_types.go | 4 ++++ .../v1beta1/zz_generated.deepcopy.go | 1 + .../v1beta1/zz_certificate_terraformed.go | 2 +- .../v1beta1/zz_certificate_types.go | 4 ++++ .../v1beta1/zz_generated.deepcopy.go | 1 + .../v1beta1/zz_generated.deepcopy.go | 1 + .../v1beta1/zz_secret_terraformed.go | 2 +- .../v1beta1/zz_secret_types.go | 6 ++++- apis/users/v1beta1/zz_generated.deepcopy.go | 5 ++++ apis/users/v1beta1/zz_user_terraformed.go | 2 +- apis/users/v1beta1/zz_user_types.go | 4 ++++ go.mod | 2 ++ go.sum | 4 ++-- ...tions.azuread.upbound.io_certificates.yaml | 21 +++++++++++++++++ ...ipals.azuread.upbound.io_certificates.yaml | 21 +++++++++++++++++ ...ronization.azuread.upbound.io_secrets.yaml | 23 +++++++++++++++++-- .../crds/users.azuread.upbound.io_users.yaml | 19 +++++++++++++++ 18 files changed, 115 insertions(+), 9 deletions(-) diff --git a/apis/applications/v1beta1/zz_certificate_terraformed.go b/apis/applications/v1beta1/zz_certificate_terraformed.go index 25176208..bb7a0593 100755 --- a/apis/applications/v1beta1/zz_certificate_terraformed.go +++ b/apis/applications/v1beta1/zz_certificate_terraformed.go @@ -21,7 +21,7 @@ func (mg *Certificate) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this Certificate func (tr *Certificate) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"value": "spec.forProvider.valueSecretRef"} + return map[string]string{"value": "valueSecretRef"} } // GetObservation of this Certificate diff --git a/apis/applications/v1beta1/zz_certificate_types.go b/apis/applications/v1beta1/zz_certificate_types.go index 20868e0d..7014f2d6 100755 --- a/apis/applications/v1beta1/zz_certificate_types.go +++ b/apis/applications/v1beta1/zz_certificate_types.go @@ -64,6 +64,10 @@ type CertificateInitParameters struct { // The type of key/certificate. Must be one of AsymmetricX509Cert or Symmetric. Changing this fields forces a new resource to be created. // The type of key/certificate Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the encoding argument. + // The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument + ValueSecretRef v1.SecretKeySelector `json:"valueSecretRef" tf:"-"` } type CertificateObservation struct { diff --git a/apis/applications/v1beta1/zz_generated.deepcopy.go b/apis/applications/v1beta1/zz_generated.deepcopy.go index fbba75ea..7e565cd3 100644 --- a/apis/applications/v1beta1/zz_generated.deepcopy.go +++ b/apis/applications/v1beta1/zz_generated.deepcopy.go @@ -1239,6 +1239,7 @@ func (in *CertificateInitParameters) DeepCopyInto(out *CertificateInitParameters *out = new(string) **out = **in } + out.ValueSecretRef = in.ValueSecretRef } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateInitParameters. diff --git a/apis/serviceprincipals/v1beta1/zz_certificate_terraformed.go b/apis/serviceprincipals/v1beta1/zz_certificate_terraformed.go index ae0a34f5..b47b4407 100755 --- a/apis/serviceprincipals/v1beta1/zz_certificate_terraformed.go +++ b/apis/serviceprincipals/v1beta1/zz_certificate_terraformed.go @@ -21,7 +21,7 @@ func (mg *Certificate) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this Certificate func (tr *Certificate) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"value": "spec.forProvider.valueSecretRef"} + return map[string]string{"value": "valueSecretRef"} } // GetObservation of this Certificate diff --git a/apis/serviceprincipals/v1beta1/zz_certificate_types.go b/apis/serviceprincipals/v1beta1/zz_certificate_types.go index 590a890d..f2cd24a0 100755 --- a/apis/serviceprincipals/v1beta1/zz_certificate_types.go +++ b/apis/serviceprincipals/v1beta1/zz_certificate_types.go @@ -51,6 +51,10 @@ type CertificateInitParameters struct { // The type of key/certificate. Must be one of AsymmetricX509Cert or Symmetric. Changing this fields forces a new resource to be created. // The type of key/certificate Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the encoding argument. + // The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER + ValueSecretRef v1.SecretKeySelector `json:"valueSecretRef" tf:"-"` } type CertificateObservation struct { diff --git a/apis/serviceprincipals/v1beta1/zz_generated.deepcopy.go b/apis/serviceprincipals/v1beta1/zz_generated.deepcopy.go index e1219c98..e3d1d6ae 100644 --- a/apis/serviceprincipals/v1beta1/zz_generated.deepcopy.go +++ b/apis/serviceprincipals/v1beta1/zz_generated.deepcopy.go @@ -169,6 +169,7 @@ func (in *CertificateInitParameters) DeepCopyInto(out *CertificateInitParameters *out = new(string) **out = **in } + out.ValueSecretRef = in.ValueSecretRef } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateInitParameters. diff --git a/apis/synchronization/v1beta1/zz_generated.deepcopy.go b/apis/synchronization/v1beta1/zz_generated.deepcopy.go index 706e8298..eb6d8bc7 100644 --- a/apis/synchronization/v1beta1/zz_generated.deepcopy.go +++ b/apis/synchronization/v1beta1/zz_generated.deepcopy.go @@ -21,6 +21,7 @@ func (in *CredentialInitParameters) DeepCopyInto(out *CredentialInitParameters) *out = new(string) **out = **in } + out.ValueSecretRef = in.ValueSecretRef } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialInitParameters. diff --git a/apis/synchronization/v1beta1/zz_secret_terraformed.go b/apis/synchronization/v1beta1/zz_secret_terraformed.go index 28fdb8ed..6f64f423 100755 --- a/apis/synchronization/v1beta1/zz_secret_terraformed.go +++ b/apis/synchronization/v1beta1/zz_secret_terraformed.go @@ -21,7 +21,7 @@ func (mg *Secret) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this Secret func (tr *Secret) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"credential[*].value": "spec.forProvider.credential[*].valueSecretRef"} + return map[string]string{"credential[*].value": "credential[*].valueSecretRef"} } // GetObservation of this Secret diff --git a/apis/synchronization/v1beta1/zz_secret_types.go b/apis/synchronization/v1beta1/zz_secret_types.go index 3fb6e878..34a25d06 100755 --- a/apis/synchronization/v1beta1/zz_secret_types.go +++ b/apis/synchronization/v1beta1/zz_secret_types.go @@ -18,6 +18,10 @@ type CredentialInitParameters struct { // The key of the secret. // Name for this key-value pair. Key *string `json:"key,omitempty" tf:"key,omitempty"` + + // The value of the secret. + // Value for this key-value pair. + ValueSecretRef v1.SecretKeySelector `json:"valueSecretRef" tf:"-"` } type CredentialObservation struct { @@ -36,7 +40,7 @@ type CredentialParameters struct { // The value of the secret. // Value for this key-value pair. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional ValueSecretRef v1.SecretKeySelector `json:"valueSecretRef" tf:"-"` } diff --git a/apis/users/v1beta1/zz_generated.deepcopy.go b/apis/users/v1beta1/zz_generated.deepcopy.go index 3e8fdf87..801b8584 100644 --- a/apis/users/v1beta1/zz_generated.deepcopy.go +++ b/apis/users/v1beta1/zz_generated.deepcopy.go @@ -185,6 +185,11 @@ func (in *UserInitParameters) DeepCopyInto(out *UserInitParameters) { } } } + if in.PasswordSecretRef != nil { + in, out := &in.PasswordSecretRef, &out.PasswordSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } if in.PostalCode != nil { in, out := &in.PostalCode, &out.PostalCode *out = new(string) diff --git a/apis/users/v1beta1/zz_user_terraformed.go b/apis/users/v1beta1/zz_user_terraformed.go index 0f1bb72f..ffc002fe 100755 --- a/apis/users/v1beta1/zz_user_terraformed.go +++ b/apis/users/v1beta1/zz_user_terraformed.go @@ -21,7 +21,7 @@ func (mg *User) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this User func (tr *User) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"password": "spec.forProvider.passwordSecretRef"} + return map[string]string{"password": "passwordSecretRef"} } // GetObservation of this User diff --git a/apis/users/v1beta1/zz_user_types.go b/apis/users/v1beta1/zz_user_types.go index 86b6609c..11353b51 100755 --- a/apis/users/v1beta1/zz_user_types.go +++ b/apis/users/v1beta1/zz_user_types.go @@ -120,6 +120,10 @@ type UserInitParameters struct { // +listType=set OtherMails []*string `json:"otherMails,omitempty" tf:"other_mails,omitempty"` + // The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user. + // The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user + PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` + // The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. // The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code PostalCode *string `json:"postalCode,omitempty" tf:"postal_code,omitempty"` diff --git a/go.mod b/go.mod index 8388a0f9..375e8e91 100644 --- a/go.mod +++ b/go.mod @@ -151,3 +151,5 @@ require ( replace github.com/hashicorp/terraform-provider-azuread => github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020 replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 + +replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535 diff --git a/go.sum b/go.sum index 498680d4..ca3d9cea 100644 --- a/go.sum +++ b/go.sum @@ -700,8 +700,6 @@ github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876f github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876fa57/go.mod h1:Pz2tdGVMF6KDGzHZOkvKro0nKc8EzK0sb/nSA7pH4Dc= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= -github.com/crossplane/upjet v1.4.0-rc.0.0.20240515193317-92d1af84d242 h1:ylmj67qVNh+AIDK+CH8BiXu41PlGSKBzAwMZApDEOds= -github.com/crossplane/upjet v1.4.0-rc.0.0.20240515193317-92d1af84d242/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= @@ -1182,6 +1180,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= +github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535 h1:D/tIcJSNk7idLCeCU4ZWRwhVwpVXruAlDn0iQG2Qvjc= +github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g= github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020 h1:BP26QEhnXcWxbJpbOT+e4bP+c9FTvqhGbtnkwXerOhA= github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020/go.mod h1:iVryf2s08Hi6HLHh4W40fudtInXuK5Y1cWVOM/3szT8= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/package/crds/applications.azuread.upbound.io_certificates.yaml b/package/crds/applications.azuread.upbound.io_certificates.yaml index c308b4f4..b2ebd969 100644 --- a/package/crds/applications.azuread.upbound.io_certificates.yaml +++ b/package/crds/applications.azuread.upbound.io_certificates.yaml @@ -487,6 +487,27 @@ spec: The type of key/certificate. Must be one of AsymmetricX509Cert or Symmetric. Changing this fields forces a new resource to be created. The type of key/certificate type: string + valueSecretRef: + description: |- + The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the encoding argument. + The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object + required: + - valueSecretRef type: object managementPolicies: default: diff --git a/package/crds/serviceprincipals.azuread.upbound.io_certificates.yaml b/package/crds/serviceprincipals.azuread.upbound.io_certificates.yaml index b675a3b6..95f36ca2 100644 --- a/package/crds/serviceprincipals.azuread.upbound.io_certificates.yaml +++ b/package/crds/serviceprincipals.azuread.upbound.io_certificates.yaml @@ -327,6 +327,27 @@ spec: The type of key/certificate. Must be one of AsymmetricX509Cert or Symmetric. Changing this fields forces a new resource to be created. The type of key/certificate type: string + valueSecretRef: + description: |- + The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the encoding argument. + The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object + required: + - valueSecretRef type: object managementPolicies: default: diff --git a/package/crds/synchronization.azuread.upbound.io_secrets.yaml b/package/crds/synchronization.azuread.upbound.io_secrets.yaml index fbb289e9..279b4de1 100644 --- a/package/crds/synchronization.azuread.upbound.io_secrets.yaml +++ b/package/crds/synchronization.azuread.upbound.io_secrets.yaml @@ -100,8 +100,6 @@ spec: - name - namespace type: object - required: - - valueSecretRef type: object type: array servicePrincipalId: @@ -208,6 +206,27 @@ spec: The key of the secret. Name for this key-value pair. type: string + valueSecretRef: + description: |- + The value of the secret. + Value for this key-value pair. + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object + required: + - valueSecretRef type: object type: array servicePrincipalId: diff --git a/package/crds/users.azuread.upbound.io_users.yaml b/package/crds/users.azuread.upbound.io_users.yaml index 32b7c2b3..984db3c9 100644 --- a/package/crds/users.azuread.upbound.io_users.yaml +++ b/package/crds/users.azuread.upbound.io_users.yaml @@ -415,6 +415,25 @@ spec: type: string type: array x-kubernetes-list-type: set + passwordSecretRef: + description: |- + The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user. + The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object postalCode: description: |- The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. From 07da687e4c866a3364649af821ae13425b1ccb1a Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Tue, 4 Jun 2024 14:58:53 +0300 Subject: [PATCH 2/3] Use the maxItemsSync schema traverser to sync the MaxItems constraints from the Go resource schema to the JSON schema. Signed-off-by: Alper Rifat Ulucinar --- config/provider.go | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/config/provider.go b/config/provider.go index cfff79f7..b030a724 100644 --- a/config/provider.go +++ b/config/provider.go @@ -6,14 +6,13 @@ package config import ( "context" - - "github.com/crossplane/upjet/pkg/config/conversion" - // Note(turkenh): we are importing this to embed provider schema document _ "embed" ujconfig "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/config/conversion" "github.com/crossplane/upjet/pkg/registry/reference" + "github.com/crossplane/upjet/pkg/schema/traverser" conversiontfjson "github.com/crossplane/upjet/pkg/types/conversion/tfjson" tfjson "github.com/hashicorp/terraform-json" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -68,15 +67,24 @@ func getProviderSchema(s string) (*schema.Provider, error) { // GetProvider returns provider configuration func GetProvider(ctx context.Context, generationProvider bool) (*ujconfig.Provider, error) { - var p *schema.Provider - var err error - if generationProvider { - p, err = getProviderSchema(providerSchema) - } else { - p, err = xpprovider.GetProviderSchema(ctx) - } + sdkProvider, err := xpprovider.GetProviderSchema(ctx) if err != nil { - return nil, errors.Wrapf(err, "cannot get the Terraform provider schema with generation mode set to %t", generationProvider) + return nil, errors.Wrap(err, "cannot get the Terraform SDK provider") + } + + if generationProvider { + p, err := getProviderSchema(providerSchema) + if err != nil { + return nil, errors.Wrap(err, "cannot read the Terraform SDK provider from the JSON schema for code generation") + } + if err := traverser.TFResourceSchema(sdkProvider.ResourcesMap).TraverseTFSchemas(traverser.NewMaxItemsSync(p.ResourcesMap)); err != nil { + return nil, errors.Wrap(err, "cannot sync the MaxItems constraints between the Go schema and the JSON schema") + } + // use the JSON schema to temporarily prevent float64->int64 + // conversions in the CRD APIs. + // We would like to convert to int64s with the next major release of + // the provider. + sdkProvider = p } pc := ujconfig.NewProvider([]byte(providerSchema), resourcePrefix, modulePath, []byte(providerMetadata), @@ -87,7 +95,7 @@ func GetProvider(ctx context.Context, generationProvider bool) (*ujconfig.Provid ), ujconfig.WithReferenceInjectors([]ujconfig.ReferenceInjector{reference.NewInjector(modulePath)}), ujconfig.WithFeaturesPackage("internal/features"), - ujconfig.WithTerraformProvider(p), + ujconfig.WithTerraformProvider(sdkProvider), ujconfig.WithSchemaTraversers(&ujconfig.SingletonListEmbedder{}), ) From 930c29ec0ea900522e4ac717dd428cb9b75f927e Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Wed, 12 Jun 2024 20:26:35 +0300 Subject: [PATCH 3/3] Bump upjet to commit 37c7f4e91d57 Signed-off-by: Alper Rifat Ulucinar --- apis/generate.go | 2 ++ config/provider.go | 2 +- go.mod | 6 +++--- go.sum | 8 ++++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apis/generate.go b/apis/generate.go index 093839bb..13bdf769 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -40,4 +40,6 @@ import ( _ "sigs.k8s.io/controller-tools/cmd/controller-gen" //nolint:typecheck _ "github.com/crossplane/crossplane-tools/cmd/angryjet" //nolint:typecheck + + _ "github.com/crossplane/upjet/cmd/scraper" ) diff --git a/config/provider.go b/config/provider.go index b030a724..692f5f96 100644 --- a/config/provider.go +++ b/config/provider.go @@ -77,7 +77,7 @@ func GetProvider(ctx context.Context, generationProvider bool) (*ujconfig.Provid if err != nil { return nil, errors.Wrap(err, "cannot read the Terraform SDK provider from the JSON schema for code generation") } - if err := traverser.TFResourceSchema(sdkProvider.ResourcesMap).TraverseTFSchemas(traverser.NewMaxItemsSync(p.ResourcesMap)); err != nil { + if err := traverser.TFResourceSchema(sdkProvider.ResourcesMap).Traverse(traverser.NewMaxItemsSync(p.ResourcesMap)); err != nil { return nil, errors.Wrap(err, "cannot sync the MaxItems constraints between the Go schema and the JSON schema") } // use the JSON schema to temporarily prevent float64->int64 diff --git a/go.mod b/go.mod index 375e8e91..e9eb8cb9 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( dario.cat/mergo v1.0.0 github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876fa57 github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 - github.com/crossplane/upjet v1.4.0-rc.0.0.20240515193317-92d1af84d242 + github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57 github.com/hashicorp/terraform-json v0.17.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500 @@ -27,6 +27,7 @@ require ( require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/agext/levenshtein v1.2.3 // indirect + github.com/alecthomas/kingpin/v2 v2.4.0 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect @@ -113,6 +114,7 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/yuin/goldmark v1.5.3 // indirect github.com/zclconf/go-cty v1.14.1 // indirect github.com/zclconf/go-cty-yaml v1.0.3 // indirect @@ -151,5 +153,3 @@ require ( replace github.com/hashicorp/terraform-provider-azuread => github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020 replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 - -replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535 diff --git a/go.sum b/go.sum index ca3d9cea..b9ae8965 100644 --- a/go.sum +++ b/go.sum @@ -632,6 +632,8 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -700,6 +702,8 @@ github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876f github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876fa57/go.mod h1:Pz2tdGVMF6KDGzHZOkvKro0nKc8EzK0sb/nSA7pH4Dc= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57 h1:hyKXccOb8BepVJj79KsvwYsid5Lhlr2DojO29Sqi+rw= +github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57/go.mod h1:wkdZf/Cvhr6PI30VdHIOjg4dX39Z5uijqnLWFk5PbGM= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= @@ -1180,8 +1184,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= -github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535 h1:D/tIcJSNk7idLCeCU4ZWRwhVwpVXruAlDn0iQG2Qvjc= -github.com/ulucinar/upbound-upjet v0.0.0-20240530235240-f4f87bab8535/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g= github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020 h1:BP26QEhnXcWxbJpbOT+e4bP+c9FTvqhGbtnkwXerOhA= github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020/go.mod h1:iVryf2s08Hi6HLHh4W40fudtInXuK5Y1cWVOM/3szT8= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -1195,6 +1197,8 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=