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 examples using typescript #107

Open
akhileshnirapure opened this issue Sep 25, 2023 · 1 comment
Open

CDKTF examples using typescript #107

akhileshnirapure opened this issue Sep 25, 2023 · 1 comment

Comments

@akhileshnirapure
Copy link

akhileshnirapure commented Sep 25, 2023

Hi,

I'm not pro with CDKTF. Tying to leverage the module you created in CDKTF project with Typescript.

The simple resource group in azure is not generated using the below generated code

import { Naming } from "./.gen/modules/Azure/azurerm/naming";

const infraNaming = new Naming(this,"infraNaming",{
suffix : ["temp"],
uniqueLength : 6
})

new ResourceGroup(this, "coreGroup", {
name: infraNaming.resourceGroupOutput,
location: defaultLocation,
});

the value of infraNaming.resourceGroupOutput --> ${TfToken[TOKEN.0]} this is not correct.

the HCL generated (removed most of code)

"resource": {
"azurerm_resource_group": {
"coreGroup": {
"//": {
"metadata": {
"path": "portal-ts/coreGroup",
"uniqueId": "coreGroup"
}
},
"location": "northeurope",
"name": "${module.infraNaming.resource_group}"
}
}
},

Which as per documentation as to be some existing property like 'name' or uniqe-name

in Typescript those properties are not generated to be used.

module.infraNaming.resource_group is object with 8 attributes

Inappropriate value for attribute "name": string required.

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

No branches or pull requests

2 participants