<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Import configuration from Hiera or a Git repository with YAML files into Terraform	</title>
	<atom:link href="https://jmorano.moretrix.com/2022/04/import-configuration-from-hiera-or-a-git-repository-with-yaml-files-into-terraform/feed/" rel="self" type="application/rss+xml" />
	<link>https://jmorano.moretrix.com/2022/04/import-configuration-from-hiera-or-a-git-repository-with-yaml-files-into-terraform/</link>
	<description>Ramblings of an old-fashioned space cowboy</description>
	<lastBuildDate>Sun, 15 Jan 2023 10:04:24 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>
		By: raff		</title>
		<link>https://jmorano.moretrix.com/2022/04/import-configuration-from-hiera-or-a-git-repository-with-yaml-files-into-terraform/#comment-259286</link>

		<dc:creator><![CDATA[raff]]></dc:creator>
		<pubDate>Sun, 15 Jan 2023 10:04:24 +0000</pubDate>
		<guid isPermaLink="false">https://jmorano.moretrix.com/?p=1393#comment-259286</guid>

					<description><![CDATA[Hey, have your right about using the terraform hiera provider? It adds his as a data source and can perform proper interpolation using hiera (ie: using the hierarch you have defined in your hiera.yaml). This means that it can perform lookups on a key with context. For example, I have my hierarchy:

- common/*
- environment/%{env}.yaml
- region/%{region}.yaml

So I can define my values at the most appropriate level, and have default values in common overridden by more specific values in environment or region.

To make this work, I typically encode his provider config (ie, the env &#038; region) into the workspace name. So a single codebase can be used to deploy into multiple regions and environments. All your have to do it&#039;s `terraform workspace new prod.us-east-1`, and run plan + apply. Your tf code needs to use a local to parse `${terraform workspace}` into env and region before passing them to the hiera provider.]]></description>
			<content:encoded><![CDATA[<p>Hey, have your right about using the terraform hiera provider? It adds his as a data source and can perform proper interpolation using hiera (ie: using the hierarch you have defined in your hiera.yaml). This means that it can perform lookups on a key with context. For example, I have my hierarchy:</p>
<p>&#8211; common/*<br />
&#8211; environment/%{env}.yaml<br />
&#8211; region/%{region}.yaml</p>
<p>So I can define my values at the most appropriate level, and have default values in common overridden by more specific values in environment or region.</p>
<p>To make this work, I typically encode his provider config (ie, the env &amp; region) into the workspace name. So a single codebase can be used to deploy into multiple regions and environments. All your have to do it&#8217;s `terraform workspace new prod.us-east-1`, and run plan + apply. Your tf code needs to use a local to parse `${terraform workspace}` into env and region before passing them to the hiera provider.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
