Skip to content

Commit

Permalink
feat: Beginning with CDKTF
Browse files Browse the repository at this point in the history
Explore basics of cdktf. Execute the equivalent of tofu-demo in Python.

Now we can avoid rendering python objects to HCL and then execute tofu on rendered files

TOOD: Still have to find a way to call `cdktf plan/diff/deploy/destroy` from python.

Right now we can do subprocess.run and parse the output.
  • Loading branch information
adityahase committed Jul 16, 2024
1 parent 5d918bb commit c1009b6
Show file tree
Hide file tree
Showing 10 changed files with 1,159 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ __pycache__

# OpenTofu state
.terraform*
terraform.tfstate*
terraform.tfstate*

# CDKTF
dist/
imports/*
!imports/__init__.py
cdktf.out
cdktf.log
12 changes: 12 additions & 0 deletions pilot/provision/cdktf-demo/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[requires]
python_version = "3"

[packages]
cdktf = "~=0.20.8"
pytest = "*"
cdktf-cdktf-provider-digitalocean = "~=11.5.2"
151 changes: 151 additions & 0 deletions pilot/provision/cdktf-demo/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c1009b6

Please sign in to comment.