Skip to main content
EXAMPLE

Component Library

Here are some examples of distributing [reusable components](https://atmos.tools/components) as part of a library.

Components
cloudposse / atmos

Try it out

Copy the example into a new directory and make it your own:

atmos init examples/demo-library
cd demo-library

Follow the README for prerequisites and next steps.

See it in action

RECORDED DEMO
demo-library
 
Recorded from this example
Real commands. Real output.
README.md1.6 KB
View on GitHub

Demo Components

Here are some examples of distributing reusable components as part of a library.

Typically, a component library will be a separate repository containing only components with a monorepo design.

Examples

These examples are somewhat contrived and selected mainly because they use remote APIs that do not require authentication.

TIP

These examples are more representative of proper child modules rather than "root modules". Remember, root modules are stateful pieces of your architecture, meaning they are Terraform root modules with a state backend. Typical root modules include networks, clusters, databases, caches, object stores, load balancers, and so on. For a real-world example of the components we use in Cloud Posse’s AWS Reference Architecture, please see `cloudposse/terraform-aws-components.

GitHub

The github/* example components use the http_provider to anonymously query the GitHub API for information.

Weather

The weather example component requests weather data from wttr.in based on the location provided.

IP Info

The ipinfo example component returns information about your current IP.