Skip to content

Commit a26710d

Browse files
committed
Run API converters on the generated example manifests
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
1 parent 7caf6f1 commit a26710d

1,922 files changed

Lines changed: 10615 additions & 1016 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/generator/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515

1616
"github.com/alecthomas/kingpin/v2"
1717
ujconfig "github.com/crossplane/upjet/v2/pkg/config"
18+
"github.com/crossplane/upjet/v2/pkg/examples/conversion"
1819
"github.com/crossplane/upjet/v2/pkg/pipeline"
1920
"github.com/hashicorp/terraform-provider-aws/xpprovider"
2021

@@ -49,6 +50,9 @@ func main() {
4950
dumpSkippedResourcesCSV(pc, skippedResourcesCSV)
5051

5152
pipeline.Run(pc, pns, absRootDir)
53+
54+
kingpin.FatalIfError(conversion.ApplyAPIConverters(pc, "../examples-generated/cluster", "../hack/boilerplate.yaml.txt"), "Cannot convert singleton lists to embedded objects in example cluster-scoped resource manifests.")
55+
kingpin.FatalIfError(conversion.ApplyAPIConverters(pns, "../examples-generated/namespaced", "../hack/boilerplate.yaml.txt"), "Cannot convert singleton lists to embedded objects in example namespace-scoped resource manifests.")
5256
}
5357

5458
func dumpGeneratedResourceList(p *ujconfig.Provider, targetPath *string) {

examples-generated/cluster/accessanalyzer/v1beta1/archiverule.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: accessanalyzer.aws.upbound.io/v1beta1
27
kind: ArchiveRule
38
metadata:

examples-generated/cluster/accessanalyzer/v1beta2/analyzer.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: accessanalyzer.aws.upbound.io/v1beta2
27
kind: Analyzer
38
metadata:

examples-generated/cluster/account/v1beta1/alternatecontact.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: account.aws.upbound.io/v1beta1
27
kind: AlternateContact
38
metadata:

examples-generated/cluster/account/v1beta1/region.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: account.aws.upbound.io/v1beta1
27
kind: Region
38
metadata:

examples-generated/cluster/acm/v1beta1/certificatevalidation.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: acm.aws.upbound.io/v1beta1
27
kind: CertificateValidation
38
metadata:

examples-generated/cluster/acm/v1beta2/certificate.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: acm.aws.upbound.io/v1beta2
27
kind: Certificate
38
metadata:

examples-generated/cluster/acmpca/v1beta1/certificateauthoritycertificate.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: acmpca.aws.upbound.io/v1beta1
27
kind: CertificateAuthorityCertificate
38
metadata:
@@ -44,7 +49,7 @@ spec:
4449
signingAlgorithm: SHA512WITHRSA
4550
templateArn: arn:${data.aws_partition.current.partition}:acm-pca:::template/RootCACertificate/V1
4651
validity:
47-
- type: YEARS
52+
type: YEARS
4853
value: 1
4954

5055
---
@@ -60,9 +65,9 @@ metadata:
6065
spec:
6166
forProvider:
6267
certificateAuthorityConfiguration:
63-
- keyAlgorithm: RSA_4096
68+
keyAlgorithm: RSA_4096
6469
signingAlgorithm: SHA512WITHRSA
6570
subject:
66-
- commonName: example.com
71+
commonName: example.com
6772
region: us-west-1
6873
type: ROOT

examples-generated/cluster/acmpca/v1beta1/permission.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: acmpca.aws.upbound.io/v1beta1
27
kind: Permission
38
metadata:
@@ -31,8 +36,8 @@ metadata:
3136
spec:
3237
forProvider:
3338
certificateAuthorityConfiguration:
34-
- keyAlgorithm: RSA_4096
39+
keyAlgorithm: RSA_4096
3540
signingAlgorithm: SHA512WITHRSA
3641
subject:
37-
- commonName: example.com
42+
commonName: example.com
3843
region: us-west-1

examples-generated/cluster/acmpca/v1beta1/policy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
16
apiVersion: acmpca.aws.upbound.io/v1beta1
27
kind: Policy
38
metadata:

0 commit comments

Comments
 (0)