This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Generate example YAMLs #48
Labels
Comments
@jbw976 mentioned that having an example YAML generated with the skeleton schema could help bootstrapping the examples. For example, we can have an example YAML generated like the following: #
# This file is generated by Terrajet to help the author of examples.
# Please uncomment the lines once you test and make sure the example works.
#
#apiVersion: ec2.aws.tf.crossplane.io/v1alpha1
#kind: Instance
#metadata:
# name: sample-instance
#spec:
# forProvider:
# region: some_value
# ami: some_value
# instanceType: some_value |
Cross-linking this comment here. Here is the source of examples for aws_instance: https://github.com/hashicorp/terraform-provider-aws/blob/main/website/docs/r/instance.html.markdown#example-usage |
This was referenced Dec 10, 2021
@ulucinar Bunch of PRs have been opened. As we talked last week, could you write down about the approach you're taking in this issue and some other possible options for discussion before going further? |
This was referenced Dec 14, 2021
Closing this issue as we have generated example manifests for the big three providers with the following PRs:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What problem are you facing?
Right now at this scale (+700 for AWS +650 for Azure etc.), we cannot write an example YAML for each resource. But we need them for documentation, Crossplane Conformance and just to make sure resource-specific stuff works, like external-name ->
id
field.How could Terrajet help solve your problem?
We can have a tool that will take HCL example and print its YAML version using the same
strcase
instance that our schema generator uses. The source of input would depend on provider but for example, AWS stores examples in their repo directly though it's not a complete list.The text was updated successfully, but these errors were encountered: