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

wip - refactoring #1

Merged
merged 21 commits into from
Jan 27, 2022
Merged

wip - refactoring #1

merged 21 commits into from
Jan 27, 2022

Conversation

kc-dot-io
Copy link
Contributor

@kc-dot-io kc-dot-io commented Dec 28, 2021

overview

This PR is address a number of things.

tasks

  • move do to workflows-sh
  • rename repo to do-k8s for symmetry
  • support layered terraform stacks
  • leverage TFC_ORG secret
  • leverage TFC_TOKEN secret
  • automatically create terraform workspaces
  • share resources across stacks using outputs
  • save kube config using doctl to secret
  • dynamically populate credentials.tfrc.json
  • dynamically populate ~/.kube/config
  • ensure scalable entropy in all namespaces

notes

  • There are some pretty significant limitations in cdktf right now
  • There's no way to support multi stack deployments or cross stack references
  • However this PR works around this and sets a path forward that will, when 0.9 of CDKTF drops Jan 22
  • This will ensure we have short term solution symetry and don't have to rewrite everything when it does.

references

@kc-dot-io kc-dot-io self-assigned this Dec 28, 2021
@kc-dot-io kc-dot-io requested review from a user and CampbellBrett and removed request for CampbellBrett and a user December 28, 2021 16:55
@kc-dot-io
Copy link
Contributor Author

There is currently an issue with compiling this because src/helper/tfc.ts won't build for some reason. I pulled it from the ofifical CDKTF CLi repo (which is also available in NPM) but it doesn't seem to want to compile and I don't know why.

We'll need to probably include this in the list of abstract helpers that need to exist across stacks.

@kc-dot-io
Copy link
Contributor Author

Ok, it looks like the cdktf limitaitons aren't that bad. There is really great support in Terraform for outputs that will get stored in workspaces and I was able to hobble a TS SDK together as well, but this still needs a lot of work. Overall the workflow is more symetrical than I expected and will improve over time as patterns stablize.

Dockerfile Outdated Show resolved Hide resolved
@kc-dot-io kc-dot-io merged commit 2485312 into main Jan 27, 2022
@kc-dot-io kc-dot-io deleted the wip branch January 27, 2022 19:44
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

Successfully merging this pull request may close these issues.

2 participants