Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Generate example manifests #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Dec 14, 2021

Description of your changes

In the context of: crossplane/terrajet#48

Adds generated example manifests for the Terraform resources.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

An example generated manifest:

# This example manifest is auto-generated, and has not been tested.
# Please make the necessary adjustments before using it.
#apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
#kind: NetworkInterface
#metadata:
#  name: example
#spec:
#  forProvider:
#    attachment:
#    - deviceIndex: 1
#      instanceRef:
#        name: example
#    privateIps:
#    - 10.0.0.50
#    securityGroupRefs:
#    - name: example
#    subnetIdRef:
#      name: example
#  providerConfigRef:
#    name: example

Corresponding Terraform registry example:

resource "aws_network_interface" "test" {
  subnet_id       = aws_subnet.public_a.id
  private_ips     = ["10.0.0.50"]
  security_groups = [aws_security_group.web.id]

  attachment {
    instance     = aws_instance.test.id
    device_index = 1
  }
}

Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have couple of comments but it's quite hard to know whether they are doable or not without seeing the approach taken, which your planned one pager should help with.

Can we comment out the whole YAML in cases where it definitely won't work, for example the ones that contain any ${...} section? Commenting out the whole YAML for every example that hasn't been tested could also be a good option, as described here.

examples-generated/eks/cluster.yaml Outdated Show resolved Hide resolved
examples-generated/rds/dbinstance.yaml Outdated Show resolved Hide resolved
examples-generated/rds/dbinstance.yaml Outdated Show resolved Hide resolved
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@ulucinar
Copy link
Collaborator Author

I have couple of comments but it's quite hard to know whether they are doable or not without seeing the approach taken, which your planned one pager should help with.

Can we comment out the whole YAML in cases where it definitely won't work, for example the ones that contain any ${...} section? Commenting out the whole YAML for every example that hasn't been tested could also be a good option, as described here.

Thanks @muvaf for the comments. We now generate the example manifests with all lines commented out as suggested. They can selectively be uncommented/edited when adjusting the example manifests.

@ulucinar ulucinar requested a review from muvaf January 12, 2022 04:25
@maltejk
Copy link

maltejk commented Feb 24, 2022

@muvaf did you find time to review this? Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants