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: synth --hcl fails to render false(bool), 0(int), ""(empty string) #3621

Open
1 task
tenminus11 opened this issue May 15, 2024 · 1 comment · May be fixed by #3626
Open
1 task

cdktf: synth --hcl fails to render false(bool), 0(int), ""(empty string) #3621

tenminus11 opened this issue May 15, 2024 · 1 comment · May be fixed by #3626
Labels
bug Something isn't working new Un-triaged issue

Comments

@tenminus11
Copy link

tenminus11 commented May 15, 2024

Expected Behavior

false should come as a parameter instead it is empty in hcl, it is present in .json
"" empty string in resource and module also fails to render
0 value also fails to render in module

module "prj_vpc-host-hub" {
  billing_account                = "${var.billing_id}"
  enable_shared_vpc_host_project = false
  folder_id                      = "${google_folder.fldr_Common.name}"
  name                           = "vpc-host-hub"
  org_id                         = "${var.organization_id}"
  source                         = "terraform-google-modules/project-factory/google"
  version                        = "~> 15.0"
}

Actual Behavior

module "prj_vpc-host-hub" {
  billing_account                = "${var.billing_id}"
  enable_shared_vpc_host_project =
  folder_id                      = "${google_folder.fldr_Common.name}"
  name                           = "vpc-host-hub"
  org_id                         = "${var.organization_id}"
  source                         = "terraform-google-modules/project-factory/google"
  version                        = "~> 15.0"
}

Steps to Reproduce

projects_arg = {
                "name": project,
                "org_id": organization_id.string_value,
                "billing_account": billing_id.string_value,
                "enable_shared_vpc_host_project": False,
                **proj_param,
            }
ProjectFactory(self, f"prj_{project}", **projects_arg)

Versions

anguage: python
cdktf-cli: 0.20.7
node: v20.12.2
cdktf: 0.20.7
constructs: 10.3.0
jsii: 1.98.0
terraform: 1.5.6
arch: x64
os: linux 6.6.15-2rodete2-amd64
python: Python 3.11.8
pip: pip 24.0 from xxxxxxx/lib/python3.11/site-packages/pip (python 3.11)
pipenv: pipenv, version 2023.12.1
providers
google@~> 5.28.0 (LOCAL)
terraform provider version: 5.28.0
cdktf-cdktf-provider-google (PREBUILT)
terraform provider version: 5.27.0
prebuilt provider version: 13.16.0
cdktf version: ^0.20.0

Providers

┌───────────────┬──────────────────┬─────────┬────────────┬─────────────────────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────┼─────────────────┤
│ google │ 5.28.0 │ │ ~> 5.28.0 │ │ │
├───────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────┼─────────────────┤
│ google │ 5.27.0 │ ^0.20.0 │ │ cdktf-cdktf-provider-google │ 13.16.0 │
└───────────────┴──────────────────┴─────────┴────────────┴─────────────────────────────┴─────────────────┘

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

No response

References

No response

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
@tenminus11 tenminus11 added bug Something isn't working new Un-triaged issue labels May 15, 2024
@tenminus11
Copy link
Author

tenminus11 commented May 16, 2024

false fails to render in module
"" empty string fails to render in resource and module
0 value also fails to render in module

@tenminus11 tenminus11 changed the title cdktf: synth --hcl fails to render false value in bool datatype in python cdktf: synth --hcl fails to render false(bool), 0(int), ""(empty string) May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Un-triaged issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant