bumpy-agent-19616
06/21/2021, 10:01 AM<project>:atlas:
cidr: 172.xx.xx.xx/24
cluster:
autoScalingDiskGbEnabled: true
mongoDbMajorVersion: 4.2
networkpeering:
resourceGroupName: rg-name
vnetName: vnet-name
numShards: 1
billowy-army-68599
06/21/2021, 10:19 AMbumpy-agent-19616
06/21/2021, 10:21 AMexport interface AtlasCluserConfig {
autoScalingDiskGbEnabled: boolean;
mongoDbMajorVersion: string;
networkpeering: AtlasCluserNetworkPeeringConfig;
numShards: number;
provider: AtlasCluserProviderConfig;
replicationFactor: number;
}
export interface AtlasConfig {
cluster: AtlasCluserConfig;
cidr: string;
}
const stack = await LocalWorkspace.createOrSelectStack({
stackName: stackName,
projectName: ATLAS_PROJECT,
program: async () => {
console.log(JSON.stringify(pulumiConfig.requireObject<AtlasConfig>('atlas')));
},
},
localworkspace.setLocalWorkspaceOptions(ATLAS_PROJECT, stackName),
);
await stack.setAllConfig({
'atlas.cidr': { value: '1'}, 'atlas.cluster.autoScalingDiskGbEnabled': { value: 'true'}
})
billowy-army-68599
06/21/2021, 11:08 AMsetAllConfig
and setting a map into it I guessbumpy-agent-19616
06/21/2021, 12:10 PMbored-oyster-3147
06/21/2021, 1:27 PMprogramFunc
as that should still function the same as before the Automation API was released, but you might have to do the writing to the config file yourself.bumpy-agent-19616
06/21/2021, 1:35 PM