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 #45

Closed
bhavinkotak opened this issue Dec 20, 2022 · 2 comments · Fixed by #112
Closed

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

bhavinkotak opened this issue Dec 20, 2022 · 2 comments · Fixed by #112
Assignees
Labels

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.

@ltdeoliveira
Copy link
Contributor

Hey @ytsarev , when do we expect a new release with this feature available?

@ytsarev
Copy link
Member

ytsarev commented Mar 23, 2023

@ltdeoliveira release is planned for next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants