Skip to content

Latest commit

 

History

History
689 lines (370 loc) · 34.1 KB

deyliki.md

File metadata and controls

689 lines (370 loc) · 34.1 KB

Deyliki - let's talk

11.06.2024:

  • 5c17 Place to keep generated terraform config
    • Firstly, the only supported syntaxes is JSON - it's generation is way more simpler than native's one.
  • 9175 Introducing deyliki
    • The idea is to keep some level of enjoy coding every day, even in a worse one

12.06.2024:

  • 6563 stub json generation
    • just defining simple entrypoint to return tf json - it returns just some valid JSON string at moment (it is not valid tf conf yet)

13.06.2024:

  • ff22 desired json output from simple example
    • just explaining how output JSON should look like for simplest example (data.aws_ami in root module)

14.06.2024:

  • f291 to opentofu (not json string)
    • define basic structure of JSON-output, return object (hash) - it will be converted to JSON-string anytime later

15.06.2024

  • 9f23 no needed to stub unknown methods of Base Node
    • remove extra lines for now, thinking how to export vars from nodes

16.06.2024

  • a109 some schemas big shenanigans
    • introduce mock schemas in a bad way, will refactor it somehow later

17.06.2024

  • 8d8e plans for future refactoring
    • just found yet another place to refactor
  • d244 pave the way to generate variables
    • but anyway is it clear how to generate variables fron "nodes"
  • 55d5 render input at node
    • render input for node is better at node level

18.06.2024

  • 63db input definition
    • schema class knows what an instance keys can be used in input (variables)
  • 0801 opentofu module variables
    • simple example of how module can render variables from its notes (not recursive yet), also enforced attrs cannot be included in input, as they already set (i.e enforced)

19.06.2024

  • 78da output: the beginning
    • starting rendering output
  • 185c output value
    • add value to every output item (to correct)

20.06.2024

  • 197c resource/data the beginning
    • starting rendering resource and data

21.06.2024

  • 7bf8 schema provider: the beginning
    • starting some needed refactoring - to not to copy schemas from owners to nodes/wrappers

22.06.2024

  • 0ecd refactor for better debugging: using schema provider instead of copying schema
    • this decreases printing the same list mocked schemas, now it just pring BaseSpec descendant
  • fdf7 NamedSchema: suppress inspecting definition
    • schemas also can suppress inspecting definition - so number of printed lines is decreased as well

23.06.2024

  • 7675 any owners can to_opentofu
    • this will be needed for recursive rendering
  • f058 wrappers can have their own named wrappers
    • to allow recursive and named(reusable) modules
  • 406c using keywords for wrapper constructor
    • initializer params look better now
  • 5241 enforceables can merge
    • core "resource/data" will be enforced from wrapper block
  • 42fa remove "provider" from enforcable for clarity
    • all current code is tightly coupled with opentofu (not flexible, but focus is focus)
  • ae04 json serialization is not needed here
    • serialization can be done in upper level if it is needed

24.06.2024

  • 9a01 wrapper should have proper core-node
    • core should be created as Node::Base within wrapper (opentofu module); also removed some unneeded methods

25.06.2024

  • 0090 recursive opentofu generation: the beginning
    • the to_opentofu method should located at node level

26.06.2024

  • b419 to_opentofu of node: implementation plan
    • unfinished plan of how to implement to_opentofu at node (todo: add rendering of wrapper's core)

27.06.2024

  • 82ca recursive to_opentofu-ing: dull implementation
    • uncorrect implementation just to pave the way to correct one

28.06.2024

  • 9c1a recursive to_opentofu-ing: yet another dull implementation
    • this implementation is still not correct but closer to correct than previous

29.06.2024

  • e66b recursive to_opentofu-ing: fixing recusrive input (variables)
    • this implementation is closer to correct than previous by only input/variables

30.06.2024

  • 9c32 recursive to_opentofu-ing: fixing recursive output
    • adding recursive output so this impl is closest to correct to date

1.07.2024

  • 05b7 recursive to_opentofu-ing: inserting core schema into wrapper
    • wrapper can render core node inside resource/data

2.07.2024

  • 4f24 recursive to_opentofu-ing: fix deep merge
    • fixing merging resource/data/module entries at owner (module) level

3.07.2024

  • 5c26 recursive to_opentofu-ing: fix internal wrapper's vars/output
    • add variables and outputs related to wrapper's core

4.07.2024

  • 7761 starting adding 'flag to enable' to opentofu-ing
    • starting to add flag_to_enable - some refactoring needed already

5.07.2024

  • 8ad4 refactoring of opentofu-ing: move outer variables generation into a method
    • this is a first part of refactoring which allow to modify opentofu-ing at specific node subclasses

6.07.2024

  • 91ae fixing of refactoring of opentofu-ing: setting variables of internal nodes into named_block
    • fix setting module variables which relates to module's internal nodes (recursively)

7.07.2024

  • 6773 refactoring of opentofu-ing: move outer outputs generation into a method
    • adding 'flag to enabled', part 1 - move outputs generation to its own method, so descendants can customize it
  • d34d refactoring of opentofu-ing: move generation of outer block into a method
    • adding 'flag to enabled', part 2 - move 'outer block' generation to its own method, so descendants can customize it
  • d441 opentofu-ing: 'flag to enabled' added
    • adding 'flag to enabled', part 3 - customize for Node::Optional
  • e2fe roadmap
    • more detailed roadmap
  • c1e8 roadmap: added some items
    • those items are important enough to be in the roadmap

8.07.2024

  • 50f8 add rspec
    • initialize rspec as tests are needed

9.07.2024

  • f1c3 rspec: simple data aws_ami: variables
    • exploring some rspec-expectations features

10.07.2024

  • 0bf2 rspec: simple data aws_ami: variables
    • rspec: testing simple outside variables generation

11.07.2024

  • 6d10 rspec: simple data aws_ami: variables
    • rspec: testing simple outside output generation
  • 474c remove suppress_definition
    • it is not needed anymore since starting testing

12.07.2024

  • e98d rspec: simple data source
    • rspec: testing simple data sources generation

13.07.2024

  • b1ab rspec: simple data resource
    • rspec: testing simple resources generation if there is no resource blocks (empty)

14.07.2024

  • 1605 rspec: simple data: module
    • rspec: testing simple modules generation if there is no module blocks (empty)

15.07.2024

  • d41f rspec: simple data: metadata (stub at the moment)
    • rspec: testing terraform-config/provider-config/locals generation (stub)

16.07.2024

  • b340 rspec: simple data: datasource aws_ami main
    • rspec: testing simple data sources generation: exact datasource tf block

17.07.2024

  • e771 rspec: simple data: datasource aws_ami main full block
    • rspec: testing simple data sources generation: exact full datasource tf block

18.07.2024

  • 202f rspec: rename one test file
    • rspec: renaming test file (with AwsAmiDataRootSimple) to correct name
  • 5060 rspec: eks with nodes: the beginning
    • rspec: testing eks-with-nodes: test opentofu method (basic)

20.07.2024 (19.07.2024 CEST)

  • 38a6 rspec: simple data: metadata (stub at the moment)
    • rspec: testing eks-with-nodes terraform-config/provider-config/locals generation (stub)

20.07.2024

  • face rspec: eks with nodes: variables/resource/data/module
    • rspec: testing eks-with-nodes high-level: variables, resources (empty at top-level), datasources(empty at top-level) and modules(some)

21.07.2024

  • a298 rspec: eks with nodes: output
    • rspec: testing eks-with-nodes high-level: output (some)

22.07.2024

  • 1370 rspec: eks with nodes: variables of aws_ami datasource
    • rspec: testing eks-with-nodes high-level: variables - test inclustion of aws_ami data source (aws_eks_cluster_main_aws_launch_template_common_launch_template_aws_ami_main)

23.07.2024

  • 5a2a rspec: eks with nodes: variables of aws_ami datasource (all)
    • rspec: testing eks-with-nodes high-level: variables - test inclustion of aws_ami data sources (all cases)

24.07.2024

  • e06a rspec: eks with nodes: "(at)resource_aws_launch_template_schema" intro
    • rspec: testing eks-with-nodes high-level: variables - introduction the schema of launch template

25.07.2024

  • 65a7 rspec: eks with nodes: "(at)resource_aws_launch_template_schema": variables
    • rspec: testing eks-with-nodes high-level: variables - the schema of launch template - cover all related variables

26.07.2024

  • 26c5 rspec: eks with nodes: variables: test flag_to_enable
    • rspec: testing eks-with-nodes high-level: variables: test of 'flag_to_enable' of Struktura23::Node::Optional

27.07.2024

  • d4b2 rspec: eks with nodes: output: aws_ami related output (one case)
    • rspec: eks-with-nodes high-level testing: output: test inclustion of aws_ami data source (just one case)

28.07.2024

  • df89 rspec: eks with nodes: output: aws_ami related output (all cases)
    • rspec: eks-with-nodes high-level testing: output: the schema of aws ami datasource - cover all related cases

29.07.2024

  • 7322 rspec: eks with nodes: output: aws launch template related output (one case)
    • rspec: eks-with-nodes high-level testing: output: test inclustion of aws_launch_template resource (just one case)

30.07.2024

  • 5ef8 rspec: eks with nodes: module: existence of modules and their 'contents'
    • rspec: eks-with-nodes high-level testing: modules: existing of target modules and check value at their 'content' key

31.07.2024

  • 53a7 rspec: eks with nodes: module: contents of 'contents' (aws_launch_template)
    • rspec: eks-with-nodes high-level testing: modules: check internals of 'module' (no passed yet)

1.08.2024

  • fce8 rspec: eks with nodes: module: contents of 'contents' (aws_launch_template): fix
    • rspec: eks-with-nodes high-level testing: modules: check internals of 'module' (fix tests)
  • 2e29 rspec: eks with nodes: module: contents of 'contents' (aws_ami datasource)
    • rspec: eks-with-nodes high-level testing: modules: check aws_ami-related internals of 'module

3.08.2024 (2.08.2024 CEST)

  • 6c14 rspec: eks with nodes: aws_eks_cluster_main module: test flag_to_enable
    • rspec: testing eks-with-nodes: test of 'flag_to_enable' of Struktura23::Node::Optional (in aws_eks_cluster_main's module)

3.08.2024

  • bc79 rspec: eks with nodes: aws_eks_cluster_main module: contents (variables count)
    • rspec: eks-with-nodes high-level testing: modules: contents: dedicated examples plus checks count of keys of 'variables'

4.08.2024

  • 4aa3 rspec: eks with nodes: aws_eks_cluster_main module: contents (what is includes in 'variables')
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'variables' (instead of count)

5.08.2024

  • 85a0 rspec: eks with nodes: aws_launch_template_launch_template module: contents (what is includes in 'variables')
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'variables' (instead of count, aws_launch_template_launch_template)

6.08.2024

  • 7413 rspec: eks with nodes: module contents variable: move to dedicated example
    • rspec: eks-with-nodes high-level testing: modules: contents: variables: move checks under dedicated example

7.08.2024

  • cc9f rspec: eks with nodes: module contents: check what is included
    • rspec: eks-with-nodes high-level testing: modules: contents: check whether known keys ("variables", "resource", "data", "output", "module", ...) are included

8.08.2024 🐱

  • c67f rspec: eks with nodes: module contents: resource
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'resource'

9.08.2024

  • 6b91 rspec: eks with nodes: module contents: data
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'data'

10.08.2024

  • f16b rspec: eks with nodes: module contents: output (1)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'output' (aws_launch_template_launch_template)

11.08.2024

  • cb84 rspec: eks with nodes: module contents: output (2)
  • 4860 rspec: eks with nodes: module contents: output (2)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'output' (aws_eks_cluster_main)

12.08.2024

  • da89 rspec: eks with nodes: module contents: output (3)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'output' (aws_eks_cluster_main) - other case

13.08.2024

  • ee10 rspec: eks with nodes: module contents: output (4)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'output' (aws_eks_cluster_main) - almost all cases

14.08.2024

  • 9922 rspec: eks with nodes: module contents: output: module (keys)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'modules' - keys

15.08.2024

  • 913f rspec: eks with nodes: module contents: output: provider/locals/terraform
    • rspec: eks-with-nodes high-level testing: modules: contents: terraform-config/provider-config/locals generation (stub)

16.08.2024

  • c7d6 rspec: eks with nodes: module contents: output: module (what is included)
    • spec: eks-with-nodes high-level testing: modules: contents: check what is included in 'modules' - it's own internal contents - module blocks

17.08.2024

  • 2a8f rspec: eks with nodes: module contents: output: module (flag to enable)
    • rspec: eks-with-nodes high-level testing: modules: contents: check what is included in 'modules' - test of 'flag_to_enable' of Struktura23::Node::Optional

19.08.2024

  • a0af rspec: eks with nodes: module contents: module (recursive)
    • rspec: eks-with-nodes high-level testing: modules: contents: check recursive 'modulea/contents'

20.08.2024

  • e49d docs: start working on new design
    • docs: need to switch to new design :)

21.08.2024

  • 4de6 docs: start working on new design: new file
    • docs: need to switch to new design - started new file

22.08.2024

  • a4d5 Update new_design.md
    • docs: new design: example as class definition

23.08.2024

  • 9684 docs: start working on new design: new file: has_root/has_anything
    • docs: new design: example of spec's root and has_xyz (simple)

26.08.2024

  • 85e5 docs: start working on new design: remember to make scheme
    • docs: new design: remember to draw scheme (diagram) later

27.08.2024

  • 5ffb docs: start working on new design: scheme start
    • docs: new design: starting drawing diagram (idea)

28.08.2024

  • 4676 docs: start working on new design: simplify user code
    • docs: new design: simple code example (single line lambda)

29.08.2024

  • 663a docs: start working on new design: compound example: the beginning
    • docs: new design: simple code example: starting to write example of reusable structs (compound???)

30.08.2024

  • 4c69 docs: start working on new design: has_many eks node group
    • docs: new design: simple code example: exampple of eks-cluster - eks-node-group ownership (not finished)

31.08.2024

  • bffb docs: start working on new design: belongs_to
    • docs: new design: simple code example: introduction of belongs_to - reverse relationship (not finished)

1.09.2024

  • 5d64 docs: new design: rename arg for readability
    • docs: new design: rename arg for 'where' func to be consistent with cases where 'belongs_to' is used
  • 7c98 docs: new design: belongs_to (complete)
    • docs: new design: simple code example: introduction of belongs_to - reverse relationship (finished)

3.09.2024

  • 579e docs: new design: enforce example (not 100 percent complete)
    • docs: new design: simple code example: introduction of enforce - 2nd time, and there are more questions now

4.09.2024

  • e9ff docs: new design: enforce example: aws_ami and launch template
    • docs: new design: simple code example: optinal ami for launch template (not complete I think)

5.09.2024

  • 6929 docs: new design: enforce example: node/optional_node
    • docs: new design: introduction of node/oprional_node for enforcing (still not complete I think)

6.09.2024

  • 31be docs: new design: enforce example: found_node
    • docs: new design: found_node instead of plain 'node' - but it's still not complete yet

7.09.2024

  • 9b07 docs: new design: found_at: intro
    • docs: new design: found_at - introduction plus optional chaining example (aws_ami)

8.09.2024

  • fd69 docs: new design: found_at: enforce_expr intro
    • docs: new design: intro of found_at? and enforce_expr - to apply complex assignments

9.09.2024

  • cd4a docs: new design: found_at: recursive example (not nice yet)
    • docs: new design: enforce by non-owner (recursive) - not a nice example

10.09.2024

  • 766f docs: new design: found_at: 'recursive example' (better)
    • docs: new design: enforce by non-owner (recursive) - better example

11.09.2024

  • 3774 docs: new design: new variant of example
    • docs: new design: more simple variant of example - avoid using anonymous functions (lambdas) where possible

12.09.2024

  • 322a docs: new design: identify_by instead of identify_by
    • identify_by is 'bidirectional' can be used for importing existing resources and to 'enforce' for_each
  • cebd docs: new design: better enforce_expression
    • enforce_expression interface is closer to enforce (attr=>val)
  • 60f4 docs: new design: launch template: identify_by name instead of id
    • id is not so good to be used as resource key

13.09.2024

  • 3636 docs: example of how to use specs (not clear yet)
    • an non-clear example of Struktur23 usage - focus on generating opentofu first?

14.09.2024

  • 3387 module-spec instead of base-spec: the beginning
    • starting implementing 'new design' in different class

15.09.2024

  • 5db5 new design: example of result spec in quasi-hcl (quasi opentofu)
    • how a generated opentofu module would be like in quasi-hcl (indeed real modules will be in JSON), next: how queries would like

16.09.2024

  • fbaf new design: tls_certificate belongs to open_connect_provider
    • tls_certificate here does make sense to enforce attribute of openid_connect_provider, and if latter is optional the tls_certificate is optional too
  • 3e07 new design: example of result query in quasi-sql
    • how quasi-SQL queries would look like (actually they are 'describe' API requests) - it still is not 100% informative because 'import script' is not shown yet

17.09.2024

  • 7da0 new design: example of result query in quasi-API-requests
    • quasi-API-request are more 'real' than quasi-SQL, but some jq stuff is still missing

18.09.2024

  • cc94 new design: example of result query in quasi-API-requests/validations/transformations
    • pseudocode of how to query such spec

19.09.2024

  • f605 start impl of new design
    • start of implementation new design - renamed Node from old implementation to BaseNode, and create new file for new one

20.09.2024

  • e12e node-base and node-singular - the beginning
    • start of implementation new design - rename more old Node clasess, and started to implement some basic stuff for new class of 'singular' node

21.09.2024

  • 2598 root claim insteas of has_root
    • plural/optional node can be root as well as singular one

22.09.2024

  • b327 root and block
    • root should work as regular node (block), so both Root and Block classes share the same functionality

23.09.2024

  • 6191 some basic core classes
    • this bunch of classes is yet another implementation of graph with parametrized edges

24.09.2024

  • b0e3 node: simplify constructor, module's root node is module itself
    • node constructor always requires to pass infra-block and type of connection, in some cases (for module_itself class method, ex 'as_root') 'nil'/(connection with ref to 'nil') can be passed
  • e4fd fix example quasi-hcl output
    • docs: new design: correct for_each for aws_ami data of aws_launch_template

25.09.2024

  • 1df1 infra-block renamed block-info
    • infra-block class renamed to block-info - starting implementing templating (internal nodes -> 'ruby' blocks -> opentofu js)

26.09.2024

  • cdb4 hcl blocks generator: the beginning
    • templating tf modules: introducing 'ruby' blocks and implementing 'all_connected_nodes' to recurosively get all nodes to be processed later

27.09.2024

  • a87e spec class is hcl-block generator
    • Spec class will be responsible to generate hcl-blocks, so that they can be transformed to opentofu-json

28.09.2024

  • bca8 new_design: correct example
    • correcting example: evety local reference should start with local.
  • 473a module-spec reverse_connections of every particular node
    • reverse connection can be useful to render hcl blocks (for_each, count, variable refs, etc)

29.09.2024

  • that's all with daily progress - swithcing to weekly...