facets-schemas

Intent Schema Guidelines

Terms

Term Description
Resource An entity declared in facets
Type of Resource or Intent A resource expressible in facets JSON representation having a defined schema
Implementation of Resource or Flavor A specific way of implementing a resource, for example redis can be implemented as a stateful set in kubernetes and elasticcache in AWS.
Blueprint Collection of resource to create a functional product
Environment Manifestation of this blueprint in any cloud
User Developer or ops person who is creating the blueprint

Anatomy of a Facets Resource JSON

Introduction

In Facets, a resource is described using a JSON file that follows a specific schema. This schema defines the different properties of a resource and how it should be provisioned within an environment. In this document, we will outline the anatomy of a resource JSON file in Facets and explain the various properties it contains.

Kind

The kind property specifies the type of resource that the JSON file represents. For example, it could be an ingress, an application, a MySQL database, etc. If this property is not specified, the default value is the folder name/instances.

Flavor

The flavor property is used to select a specific implementation of the resource type. For example, for a resource type of ingress, a flavor of default, aws_alb, or gcp_alb could be specified. This property allows for flexibility in choosing the implementation that best fits the needs of the environment.

Version

The version property is used to specify a particular version of the resource implementation. This is useful when there are multiple versions of an implementation available, and you want to pin the resource to a specific version. The default version is the latest version available.

Disabled

The disabled property is a boolean flag that allows the user to disable the resource. This is useful when a resource is not needed or is temporarily unavailable.

Provided

The provided property is a boolean flag that specifies whether the resource should be provisioned by Facets or not. For example, a MySQL database may be provisioned outside of Facets, but can still exist within the blueprint for other resources to refer to its URL, username, etc. In this case, the provided property would be set to true, and the out section would be populated by the user.

Depends On

The depends_on property lists any dependencies that the resource has on other resources. For example, an application may depend on a MySQL database. The depends_on property would be set to [“mysql.y”].

Metadata

The metadata property contains metadata related to the resource. This includes the name of the resource and any other relevant information. If the name property is not specified, the default value is the file name.

Spec

The spec property contains the specification for the resource. This is where the specific details of the resource are defined, and it follows the schema for the specific resource type.

Out

The out property contains the output given by the resource for others to refer. This includes any relevant information that other resources may need to use, such as URLs, usernames, and passwords. The out section follows the schema for the specific resource type.

Advanced

The advanced property is an optional field that contains additional fields that are specific to a particular implementation of a resource. This allows for greater customization and configuration of the resource beyond the standard fields.

Supported Services

Kind Flavor Version Schema Sample Readme
ingress nginx_ingress_controller 0.2 https://facets-cloud.github.io/facets-schemas/schemas/ingress/ingress.schema.json Sample Readme
ingress nginx_k8s_native 0.1 https://facets-cloud.github.io/facets-schemas/schemas/ingress/ingress.schema.json Sample Readme
ingress aws_alb 0.2 https://facets-cloud.github.io/facets-schemas/schemas/ingress/ingress.schema.json Sample Readme
ingress gcp_alb 0.2 https://facets-cloud.github.io/facets-schemas/schemas/ingress/ingress.schema.json Sample Readme
redis memorystore 0.2 https://facets-cloud.github.io/facets-schemas/schemas/redis/redis.schema.json Sample Readme
redis elasticache 0.2 https://facets-cloud.github.io/facets-schemas/schemas/redis/redis.schema.json Sample Readme
redis k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/redis/redis.schema.json Sample Readme
redis azure_cache 0.1 https://facets-cloud.github.io/facets-schemas/schemas/redis/redis.schema.json Sample Readme
postgres cloudsql 0.2 https://facets-cloud.github.io/facets-schemas/schemas/postgres/postgres.schema.json Sample Readme
postgres alloydb 0.2 https://facets-cloud.github.io/facets-schemas/schemas/postgres/postgres.schema.json Sample Readme
postgres k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/postgres/postgres.schema.json Sample Readme
postgres aurora 0.1 https://facets-cloud.github.io/facets-schemas/schemas/postgres/postgres.schema.json Sample Readme
mysql cloudsql 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql/mysql.schema.json Sample Readme
mysql aurora 0.2 https://facets-cloud.github.io/facets-schemas/schemas/mysql/mysql.schema.json Sample Readme
mysql flexible_server 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql/mysql.schema.json Sample Readme
mysql k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql/mysql.schema.json Sample Readme
mysql rds 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql/mysql.schema.json Sample Readme
config_map k8s 0.2 https://facets-cloud.github.io/facets-schemas/schemas/config_map/config_map.schema.json Sample Readme
dax_cluster default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/dax_cluster/dax_cluster.schema.json Sample Readme
kubernetes_node_pool aks 0.1 https://facets-cloud.github.io/facets-schemas/schemas/kubernetes_node_pool/kubernetes_node_pool.schema.json Sample Readme
kubernetes_node_pool gke_node_pool 0.1 https://facets-cloud.github.io/facets-schemas/schemas/kubernetes_node_pool/kubernetes_node_pool.schema.json Sample Readme
kubernetes_node_pool eks_self_managed 0.1 https://facets-cloud.github.io/facets-schemas/schemas/kubernetes_node_pool/kubernetes_node_pool.schema.json Sample Readme
kubernetes_node_pool eks_managed 0.2 https://facets-cloud.github.io/facets-schemas/schemas/kubernetes_node_pool/kubernetes_node_pool.schema.json Sample Readme
sqs default 0.2 https://facets-cloud.github.io/facets-schemas/schemas/sqs/sqs.schema.json Sample Readme
iam_policy aws_iam_policy 0.2 https://facets-cloud.github.io/facets-schemas/schemas/iam_policy/iam_policy.schema.json Sample Readme
helm k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/helm/helm.schema.json Sample Readme
service k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/service/service.schema.json Sample Readme
service vm 0.1 https://facets-cloud.github.io/facets-schemas/schemas/service/service.schema.json Sample Readme
log_collector loki_aws_s3 0.2 https://facets-cloud.github.io/facets-schemas/schemas/log_collector/log_collector.schema.json Sample Readme
log_collector k8s 0.2 https://facets-cloud.github.io/facets-schemas/schemas/log_collector/log_collector.schema.json Sample Readme
log_collector loki_gcp_gcs 0.2 https://facets-cloud.github.io/facets-schemas/schemas/log_collector/log_collector.schema.json Sample Readme
log_collector loki_azure_blob 0.2 https://facets-cloud.github.io/facets-schemas/schemas/log_collector/log_collector.schema.json Sample Readme
snapshot_schedule default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/snapshot_schedule/snapshot_schedule.schema.json Sample Readme
aws_static_website default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_static_website/aws_static_website.schema.json Sample Readme
aws_event_bus default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_event_bus/aws_event_bus.schema.json Sample Readme
google_cloud_storage default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/google_cloud_storage/google_cloud_storage.schema.json Sample Readme
aws_iam_role default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_iam_role/aws_iam_role.schema.json Sample Readme
service_bus azure_service_bus 0.1 https://facets-cloud.github.io/facets-schemas/schemas/service_bus/service_bus.schema.json Sample Readme
dynamodb default 0.2 https://facets-cloud.github.io/facets-schemas/schemas/dynamodb/dynamodb.schema.json Sample Readme
kafka k8s 0.2 https://facets-cloud.github.io/facets-schemas/schemas/kafka/kafka.schema.json Sample Readme
kafka msk 0.1 https://facets-cloud.github.io/facets-schemas/schemas/kafka/kafka.schema.json Sample Readme
atlas_account default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/atlas_account/atlas_account.schema.json Sample Readme
aws_api_gateway default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_api_gateway/aws_api_gateway.schema.json Sample Readme
schemahero_table k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/schemahero_table/schemahero_table.schema.json Sample Readme
elasticsearch k8s 0.2 https://facets-cloud.github.io/facets-schemas/schemas/elasticsearch/elasticsearch.schema.json Sample Readme
elasticsearch opensearch 0.1 https://facets-cloud.github.io/facets-schemas/schemas/elasticsearch/elasticsearch.schema.json Sample Readme
aws_eventbridge default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_eventbridge/aws_eventbridge.schema.json Sample Readme
loki_recording_rules k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/loki_recording_rules/loki_recording_rules.schema.json Sample Readme
gcp_iam_role default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/gcp_iam_role/gcp_iam_role.schema.json Sample Readme
mongo atlas 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mongo/mongo.schema.json Sample Readme
mongo documentdb 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mongo/mongo.schema.json Sample Readme
mongo k8s 0.3 https://facets-cloud.github.io/facets-schemas/schemas/mongo/mongo.schema.json Sample Readme
pvc k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/pvc/pvc.schema.json Sample Readme
status_check default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/status_check/status_check.schema.json Sample Readme
mysql_user sharded_user 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql_user/mysql_user.schema.json Sample Readme
mysql_user default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mysql_user/mysql_user.schema.json Sample Readme
mongo_user default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/mongo_user/mongo_user.schema.json Sample Readme
postgres_user default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/postgres_user/postgres_user.schema.json Sample Readme
aws_waf default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_waf/aws_waf.schema.json Sample Readme
peering default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/peering/peering.schema.json Sample Readme
k8s_resource k8s 0.2 https://facets-cloud.github.io/facets-schemas/schemas/k8s_resource/k8s_resource.schema.json Sample Readme
cloudfront default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/cloudfront/cloudfront.schema.json Sample Readme
cloudflare default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/cloudflare/cloudflare.schema.json Sample Readme
alb default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/alb/alb.schema.json Sample Readme
aws_lambda_permission default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_lambda_permission/aws_lambda_permission.schema.json Sample Readme
kubernetes_secret k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/kubernetes_secret/kubernetes_secret.schema.json Sample Readme
grafana_dashboard default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/grafana_dashboard/grafana_dashboard.schema.json Sample Readme
zookeeper k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/zookeeper/zookeeper.schema.json Sample Readme
loki_alerting_rules k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/loki_alerting_rules/loki_alerting_rules.schema.json Sample Readme
cassandra k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/cassandra/cassandra.schema.json Sample Readme
azure_functions default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/azure_functions/azure_functions.schema.json Sample Readme
alert_group default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/alert_group/alert_group.schema.json Sample Readme
aws_lambda default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_lambda/aws_lambda.schema.json Sample Readme
azure_storage_container default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/azure_storage_container/azure_storage_container.schema.json Sample Readme
externaldns default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/externaldns/externaldns.schema.json Sample Readme
tcp_lb nlb 0.2 https://facets-cloud.github.io/facets-schemas/schemas/tcp_lb/tcp_lb.schema.json Sample Readme
schemahero_database k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/schemahero_database/schemahero_database.schema.json Sample Readme
aws_dlm_lifecycle_policy default 0.1 https://facets-cloud.github.io/facets-schemas/schemas/aws_dlm_lifecycle_policy/aws_dlm_lifecycle_policy.schema.json Sample Readme
rabbitmq k8s 0.1 https://facets-cloud.github.io/facets-schemas/schemas/rabbitmq/rabbitmq.schema.json Sample Readme
s3 default 0.2 https://facets-cloud.github.io/facets-schemas/schemas/s3/s3.schema.json Sample Readme