Ticket DescriptionLinkStory PointsDue On
instance-wide ulidTF-5320304/21/2023

Understand

Link copied to clipboard

Problem Statement

Link copied to clipboard
As a TFE engineer, I want to create a single, global ULID stored in Postgres so that all go-census agents in a TFE installation share the same ProcessID.

Understood Answer

Link copied to clipboard
What is.....
  • TFE Engineer: Me.
  • Create: bring in thing into existence.
  • Single: One.
  • Global: in this context this means accessible throughout the program.
  • ULID: Kinda like a UUID accept with different features. None of which I can name.
  • Stored in Postgres: Well Postgres is a database management system and stored means to retain or enter for electronic retrieval.
  • go-census: census means an official count or survey of population and Go is a programming language. So together that means we use the Go programming language to count or survey the population of an object
  • agents: "intelligent" entities that are capable of making decisions, taking actions, and interacting with their environment. So they are a thing in an application that do things for you given some sort of input.
  • Terraform Enterprise: self-hosted instance of terraform cloud.
  • Installation: place in position for use
converted response given what you think you know.
I want to create one, accessible anywhere, ProcessID that is a ULID and store it in PostgreSQL so that the go-census agents will share the same ProcessID

Plan

Link copied to clipboard
Create a function that generates the process ID. The function should do the following:
  1. Connect to the PostgreSQL database.
  2. If the is an error connecting to the data return an an empty ULID and the error
  3. Close the connection when the function is done.
  4. Check if there is a ULID present
  5. If no rows are found on the table return the error
Made with Markbase