samy-dougui / ptf Goto Github PK
View Code? Open in Web Editor NEWPolicy as Code framework to control your Terraform deployments with HCL files.
Home Page: https://samy-dougui.github.io/ptf/
License: MIT License
Policy as Code framework to control your Terraform deployments with HCL files.
Home Page: https://samy-dougui.github.io/ptf/
License: MIT License
The goal would be to able to create local variables (module scoped) as locals in terraform.
Syntax should be like in Terraform:
locals {
foo = bar
}
my_rule_attribute = local.foo
The load of the local variables should be done during the creation of the hcl context as it would be used inside the rule block.
A "module" (group of policy) of policy should be called a policies
policies "azure_container_storage"{
source = "path/to/policies"
foo=bar
}
We should also be able to allow wildcard (for example with for_each and count, it creates an address with a list inside).
For example:
address = address_example.[*]
We should be able to filter on the change operation that Terraform wants to do.
It's referring to this attribute of the resource change:
"change": {
"actions": [
"no-op"
],
}
Should be done after the issue #9 is done.
On every push, to any branch, the CI with the unit tests should be triggered.
When a push is made to main, the end-to-end tests should be done
In the condition block, the attribute field allows to select nested attribute,
For example, "metadata.hdi_version" means PTF will be looking for something like
"metadata" : {
"hdi_version": "value"
}
Sometimes, we have something like:
"blob_properties": [
{
"change_feed_enabled": "value",
"container_delete_retention_policy": [],
"cors_rule": [],
"default_service_version": "",
"delete_retention_policy": [],
"last_access_time_enabled": "value",
"versioning_enabled": "value"
}
],
We should be able to control that by providing the attribute:
blob_properties[int | "*"].cors_rule
A summary after the execution should say:
The documentation should include:
A subcommand should be created to help the user validate the policy files.
The UX should be something like:
ptf validate-config --chdir path
This command should always ran before the apply to make sure the configuration is valid
The CD pipeline should be triggered when a tag has been pushed to main.
It should create a binary executable on macOS, windows and linux (at least ubuntu and debian).
Every policy can and should be applied in parallel, to diminish the time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.