worried-city-86458
09/09/2019, 5:43 AMbroad-dog-22463
09/09/2019, 9:32 AMconfig hierarchy
. Personally, I would suggest using different stacks and then having shared StackReferences if you need to share valuescool-egg-852
09/09/2019, 2:38 PMPulumi.yaml
Pulumi.development.yaml
he can set overrides or per environment values.broad-dog-22463
09/09/2019, 2:42 PMworried-city-86458
09/09/2019, 6:35 PMcool-egg-852
09/09/2019, 6:45 PMconfig.ts
for all projects. This is where we put StackReferences, config logic, etc.pulumi.getConfig()
outside of this config.ts
import { VisibilityTypes } from '../../libraries/visibilityTypes';
import * as standard from '../../config/standard';
// Standard configs
export * from '../../config/standard';
// Per project configs
export const appDnsHost = `${standard.project}.${standard.shared.domain}`;
export const appVisibility = VisibilityTypes.internal;
export const appLabels = {
'<http://app.kubernetes.io/name|app.kubernetes.io/name>': standard.project,
'<http://app.kubernetes.io/component|app.kubernetes.io/component>': 'web'
};
export const docsDnsHost = `${standard.project}.docs.${standard.shared.domain}`;
export const docsLabels = {
'<http://app.kubernetes.io/name|app.kubernetes.io/name>': standard.project,
'<http://app.kubernetes.io/component|app.kubernetes.io/component>': 'docs'
};
`standard.ts`:
import * as pulumi from '@pulumi/pulumi';
import vaultClient from '../libraries/vault-client';
import getSharedConfig from './index';
export const project = pulumi.getProject();
export const environment = pulumi.getStack();
export const vault = vaultClient(environment, project);
export const shared = getSharedConfig(environment);
export const support = getSharedConfig('support');
export const linio = new pulumi.Config('linio');
export const kubernetes = new pulumi.Config('kubernetes');
export const gcp = new pulumi.Config('gcp');
export const aws = new pulumi.Config('aws');
for examplePulumi.stack.yaml
as much as possible we’ve removed the limitations we have there. Though we do make use of it for per environment values, including stuff like linio:appVersion
, linio:appMaxReplicas
, etc. So our values that are always the same go into config.ts
. We’re still in the process of cleaning everything up as we learn the best ways to use Pulumi.worried-city-86458
09/09/2019, 8:20 PMcool-egg-852
09/09/2019, 8:28 PM