Questions tagged [cdktf]

Resources:

28 questions
0
votes
0 answers

Cdktf data source for any resources

I want to get id of any resources using resource name is there any way? Example If I wanted to get id of storage account or virtual machine or anything else how can I achieve using single block instead declaring calling data source of particular…
0
votes
1 answer

Deploying inter dependent stacks at once with CDKTF

I'm using CDKTF version 0.9.4 to deploy two stacks associated with an app. The docs says I have to simply list'em all or use '*'. Running cdktf deploy '*' I get: Can't find the given stack *. I then listed all of'em and received Unable to find…
Lucas Abreu
  • 425
  • 3
  • 14
0
votes
1 answer

Terraform CDKTF Unable to Find remote state

It has not been too long since I started working with C# and Terraform. Some things are not entirely clear and it reflects as Terraform refuses to plan my generated cloud environment stacks. The issue seems to be rooted in cross referencing…
CCG
  • 97
  • 1
  • 10
0
votes
2 answers

how to write cdktf module instead terraform module

Instead of referring terraform module in cdktf i want to refer CDKTF typescript files to combine several resources as one. How can i achieve this? Below is for terraform module but expecting something like this for cdktf "terraformModules": [ …
0
votes
1 answer

Autoscaling Fargate cluster based on custom metric

I'm trying to set up an autoscaling Fargate cluster for GitHub self-hosted runners. The high-level design for this looks like this – A GitHub app will send a webhook event to a Lambda behind an API gateway. The Lambda will put a custom COUNT metric…
GPX
  • 3,506
  • 10
  • 52
  • 69
0
votes
1 answer

Data sources in CDKTF

I am trying to replicate one of my simple stacks from HCL to TypeScript (using CDKTF), I am having issues setting up a data source to get a list of AMIs. This is what I am trying to do: const amis = new ec2.DataAwsAmiIds(this, "ami-ids", { owners:…
user1314147
  • 174
  • 1
  • 5
  • 25
0
votes
1 answer

Cdktf Optional block

How to make block optional if the value for the below block not provided? const BackupType=new TerraformVariable(this,"BackupType",{ description:"(Required) The type of the backup. Possible values are Continuous and Periodic. Defaults to…
0
votes
1 answer

Terraform CDKTF How to Access Data List Attribute with Python Within Resource

I have this Terraform HCL code which works perfectly: data "aws_availability_zones" "zones" { state = "available" } resource "aws_vpc" "CustomVpc" { cidr_block = "10.0.0.0/16" tags = { Name = "dcb-vpc" } } resource "aws_subnet"…
0
votes
2 answers

What is the command to install azuredevops provider in cdktf?

What is the command to install azuredevops provider in cdktf ? Something like ** npm install @cdktf/provider-azuredevops**
0
votes
1 answer

Can I create an AWS state machine using the CDK for Terraform?

I've been following the instructions here to stand up a new cdktf java project. My current goal is to build a process that can create AWS state machine using a fluent-like syntax that I can then deploy to via terraform. It seems like cdktf is what…
0
votes
1 answer

cdktf diff command with variables pass

Can you suggest how can i use cdktf diff to pass multiple var in cli? terraform plan -var "resourceName=testrg" -var "resourcelocation=eastus" Similar like above needed in cdktf.
0
votes
1 answer

How to deploy App Service with Azure Container Registry by cdktf

I am trying to create an App Service with Azure Container Registry with CDKTF and Provider AzureRM 2.70.0 (also tried with the latest) While I wrote these codes this.appService = new AppService(this, "iShare App", { name:…
0
votes
1 answer

Initialize a new CDKTF for Terraform application in Python

I am unable to initialize a terraform application using CDKTF and Python. I have created a virtual env and initializing it. https://learn.hashicorp.com/tutorials/terraform/cdktf-build-python?in=terraform/cdktf Using cdktf init…
KrisTej
  • 75
  • 4
1
2