Static Resources

A static resource refers to a pre-existing resource that can be referenced in templates. For example, it could be an existing database instance or any other service. There are two types of static resources:

  1. Static Environment: Resources from an already created environment that are made available to the Environment Template
  2. Static Resource: Predefined, unchangeable values, similar to constants. These values can be provided in formats such as HCL, JSON, expressions, or plain text

Sample Static Resource spec

apiVersion: eaas.envmgmt.io/v1
kind: Resource
metadata:
  name: static-resource
  project: madhu-demo-static
spec:
  variables:
  - name: eks_cluster_name
    options:
      description: fds
    value: clustertest-madhu-eks-demo2
    valueType: text

The static resource or environment can be referred to in the environment template under resources with kind as “Resource” or “Environment” as below.

apiVersion: eaas.envmgmt.io/v1
kind: EnvironmentTemplate
metadata:
  name: madhu-static-resource
  project: madhu-demo-static
spec:
  hooks: {}
  resources:
  - kind: resource
    name: static-resource
    type: static
 - kind: environment
    name: eks-cluster-for-static-env-resource
    type: static
 - kind: resourcetemplate
    name: rds-demo1-variables
    resourceOptions:
      version: newagent
    type: dynamic