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

vars should be able to take non-flat values #151

Open
bhavinkotak opened this issue Dec 19, 2022 · 3 comments
Open

vars should be able to take non-flat values #151

bhavinkotak opened this issue Dec 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@bhavinkotak
Copy link

What happened?

Usecase: We are trying to create EKS Cluster using Crossplane and to create multiple Node-groups/launch-templates we are using terraform-provider to dynamically read the details from the claim.yaml

claim.yaml

kind: ManagedCluster
metadata:
  namespace: crossplane-system
  name: eks-cluster
parameters:
    region: us-east-2
    version: "1.21"
    nodeRole: arn:aws:iam::xxxxx:role/eksNodeRole
    nodeGroups:
      - desiredSize: 2
        maxSize: 2
        minSize: 2
        instanceType: m5.4xlarge
        label: fruit=apple
        volumeSize: 150
      - desiredSize: 1
        maxSize: 1
        minSize: 1
        instanceType: m5.4xlarge
        label: fruit=banana
        volumeSize: 80

As per current behavior, terraform-provider gives 2 options to pass variables - vars & varFiles.

varFiles supports data in HCL or JSON format.
vars support data in plain string - flat values only.

What environment did it happen in?

Crossplane version: 1.10.1
provider-terraform: 0.2.0
Kubernetes: 1.23

Solution could be to enhance vars to take non-flat values as input & internally convert to HCL/JSON to pass to terraform-provider.

@bhavinkotak bhavinkotak added the bug Something isn't working label Dec 19, 2022
@ytsarev ytsarev added enhancement New feature or request and removed bug Something isn't working labels Dec 19, 2022
@ytsarev
Copy link
Collaborator

ytsarev commented Dec 19, 2022

Thanks a lot for the report! Marking it as an enhancement as it extends the original basic implementation.

@bobh66
Copy link
Collaborator

bobh66 commented Dec 20, 2022

This should probably be moved to the upbound/provider-terraform repo

@bhavinkotak
Copy link
Author

Moved to upbound/provider-terraform - upbound/provider-terraform#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants