Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce entrypoint to enable working with relative path modules #111

Merged
merged 2 commits into from
Oct 5, 2022

Conversation

ytsarev
Copy link
Collaborator

@ytsarev ytsarev commented Oct 4, 2022

Description of your changes

Fixes #83

Signed-off-by: Yury Tsarev yury@upbound.io

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

Used https://github.com/ytsarev/provider-terraform-test-module for e2e testing

$ cat tf.yaml
apiVersion: tf.crossplane.io/v1alpha1
kind: Workspace
metadata:
  name: relative-path-test
spec:
  forProvider:
    module: git::https://github.com/ytsarev/provider-terraform-test-module.git
    source: Remote
    entrypoint: relative-path-iam
    vars:
      - key: iamRole
        value: relative-path-test

$ cat tf-regression.yaml
apiVersion: tf.crossplane.io/v1alpha1
kind: Workspace
metadata:
  name: regression-test
spec:
  forProvider:
    module: git::https://github.com/ytsarev/provider-terraform-test-module.git//iam?ref=main
    source: Remote
    vars:
      - key: iamRole
        value: regression-test

k apply -f tf.yaml

k apply -f tf-regression.yaml

k get -f tf-regression.yaml
NAME              READY   SYNCED   AGE
regression-test   True    True     4m52s

k get -f tf.yaml
NAME                 READY   SYNCED   AGE
relative-path-test   True    True     4m52s

Copy link
Collaborator

@bobh66 bobh66 left a comment

Choose a reason for hiding this comment

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

LGTM - maybe add a section in the README with a brief description of the scenario where entrypoint is used?

Signed-off-by: Yury Tsarev <yury@upbound.io>
@ytsarev
Copy link
Collaborator Author

ytsarev commented Oct 5, 2022

@bobh66 thanks a lot for the review, PR amended with the README extension 👍

@ytsarev ytsarev requested a review from bobh66 October 5, 2022 08:11
@ytsarev ytsarev merged commit 7b79d80 into crossplane-contrib:master Oct 5, 2022
@ytsarev ytsarev deleted the entrypoint branch October 5, 2022 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

problem using modules with a relative path
2 participants