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

CDKTF: Error Generating External Module #2983

Closed
1 task
sabinayakc opened this issue Jul 5, 2023 · 1 comment · Fixed by #2986
Closed
1 task

CDKTF: Error Generating External Module #2983

sabinayakc opened this issue Jul 5, 2023 · 1 comment · Fixed by #2986
Labels
bug Something isn't working

Comments

@sabinayakc
Copy link
Contributor

sabinayakc commented Jul 5, 2023

Expected Behavior

Download external module with default variables shouldn't cause any issue.

Module: https://github.com/terraform-aws-modules/terraform-aws-iam

Actual Behavior

  • Module has error after conversion using cdtkf get

Terminal Output Screenshot(s)

image

Steps to Reproduce

  • Create a cdktf project.
  • Add IAM module to cdtkf.json like below
"terraformModules": [
    {
      "name": "eks-module",
      "source": "terraform-aws-modules/eks/aws",
      "version": "19.15.3"
    },
    {
      "name": "eks-module-irsa",
      "source": "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks",
      "version": "5.25.0"
    },
  ],
  • Run cdktf get
  • Run npm run watch

Versions

language: typescript
cdktf-cli: 0.17.0
node: v16.19.1
terraform: 1.4.0
arch: x64
os: linux 5.15.90.1-microsoft-standard-WSL2

Providers

"terraformProviders": [
    {
      "name": "aws",
      "source": "hashicorp/aws",
      "version": "~> 4.58"
    },
    {
      "name": "helm",
      "source": "hashicorp/helm",
      "version": "~> 2.3"
    },
    {
      "name": "kubernetes",
      "source": "hashicorp/kubernetes",
      "version": "~> 2.16"
    },
    {
      "name": "external",
      "source": "hashicorp/external",
      "version": "~> 2.3"
    },
    {
      "name": "null",
      "source": "hashicorp/null",
      "version": "~> 3.2"
    },
    {
      "name": "http",
      "source": "hashicorp/http",
      "version": "~> 3.3"
    },
    "gavinbunney/kubectl@~>1.14.0",
    {
      "name": "postgresql",
      "source": "cyrilgdn/postgresql",
      "version": "1.19.0"
    },
    {
      "name": "random",
      "source": "hashicorp/random",
      "version": "~> 3.4.2"
    }
  ],
  "terraformModules": [
    {
      "name": "eks-module",
      "source": "terraform-aws-modules/eks/aws",
      "version": "19.15.3"
    },
    {
      "name": "eks-module-irsa",
      "source": "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks",
      "version": "5.24.0"
    },
    {
      "name": "rds-aurora-module",
      "source": "terraform-aws-modules/rds-aurora/aws",
      "version": "~> 8.3.1"
    }
  ],

Gist

No response

Possible Solutions

  • We need to look into how the module is converted to typescript when there is an extra /* in the default value of an input variable.

Workarounds

Using version lower than v5.24.0

Anything Else?

References

terraform-aws-modules/terraform-aws-iam#405

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@sabinayakc sabinayakc added bug Something isn't working new Un-triaged issue labels Jul 5, 2023
@DanielMSchmidt DanielMSchmidt removed the new Un-triaged issue label Jul 14, 2023
@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
2 participants