square-coat-62279
11/05/2021, 2:39 AMsquare-coat-62279
11/05/2021, 2:40 AMhigh-holiday-63390
11/05/2021, 11:57 AMsalmon-raincoat-19475
11/05/2021, 12:26 PMpyinfra
use-case, but if we can do it in pulumi, then even better!
I'm curious what other teams have utilized for this.
Please select an option below for easy voting:
1️⃣ Ansible
2️⃣ PyInfra
3️⃣ Pulumi all the way! - please expand in comments if you don't mind.
4️⃣ Other: Please note what you're using in the comments if you don't mind.
Thanks!able-camera-57198
11/05/2021, 1:36 PMfuture-refrigerator-88869
11/05/2021, 2:26 PMPulumi.yaml
file via env variables ? I would like to get a stack output from CI/CD but I don't really want to create a Pulumi.yaml file in the project I'll be running this.sparse-spring-91820
11/05/2021, 3:46 PMA
I created a VPC like this:
const vpc = new awsx.ec2.Vpc('project-a-vpc', { numberOfAvailabilityZones: 2 });
module.exports = { vpcId: vpc.id };
and inside project B
I created Vpc resource pointing to existing Vpc like this:
const stack = new pulumi.StackReference('myorg/stack-a/main');
const vpcId = mainStack.getOutput('vpcId');
const vpc = new awsx.ec2.Vpc('vpc', { vpcId });
But when I try to use the publicSubnetIds property it says it is an empty array, but inside stack A, it is not empty.
const dbSubnetGroup = new aws.rds.SubnetGroup('db-subnet-group', {
subnetIds: vpc.publicSubnetIds
});
Any clue how can I refer to an existing vpc and use all its properties as I would inside project A?
Also, if I go with this solution of getting existing vpc:
const vpc = aws.ec2.Vpc.get('vpc', vpcId);
i dont have publicSubnetIds
property at all.faint-whale-905
11/05/2021, 6:58 PMfaint-whale-905
11/05/2021, 6:58 PMglamorous-kitchen-14786
11/05/2021, 9:30 PMpulumi stack select <stackname> --cwd /path/to/pulumi/folder
in a shell script being executed by a github action might fail because it cannot see a Pulumi.yaml?
I'm echoing out an ls of the path I am feeding to the --cwd flag and it shows what I am expecting (including the Pulumi.yaml file) and the same approach is working just fine if I execute a shell script as normal from the same directory from my local.
ls _$PULUMI_DIR_
/root/.pulumi/bin/pulumi stack select _$1_ --cwd _$PULUMI_DIR_
powerful-football-81694
11/06/2021, 12:24 PMable-camera-57198
11/06/2021, 4:01 PMComponentResources
so that they can be passed elsewhere in the stack?
For example:
[Output]
public Network ProjectNetwork { get; set; }
// later...
ProjectNetwork = new Network(
"project",
options: new()
{
Parent = this,
DependsOn =
{
computeService,
},
},
args: new()
{
Name = "blablabla",
AutoCreateSubnetworks = true,
}
);
gentle-cricket-92920
11/06/2021, 5:29 PMexport const bucketEndpoint = pulumi.interpolate`http://${bucket.websiteEndpoint}`;
The output for this is:
bucketEndpoint: "<http://undefined>"
Any idea why?able-camera-57198
11/06/2021, 6:26 PMcool-computer-99882
11/07/2021, 7:21 PMbulky-area-51023
11/07/2021, 8:10 PMproviders
map, but I’m not still sure whether I can use two regions of AWS in single componentResource. What could be the best practice when we need multiple AWS providers in single ComponentResource?high-holiday-63390
11/07/2021, 9:36 PMhigh-holiday-63390
11/07/2021, 9:36 PMhigh-holiday-63390
11/07/2021, 9:40 PMhigh-holiday-63390
11/07/2021, 10:28 PMhigh-holiday-63390
11/07/2021, 10:28 PMconst privateSubnets = await vpc.getSubnets('private')
const result = privateSubnets.map(net => net.id).join(",")
high-holiday-63390
11/07/2021, 11:58 PMfaint-planet-84558
11/08/2021, 5:58 AMadorable-soccer-30455
11/08/2021, 12:53 PMconst acr = new azure_native.containerregistry.Registry("acr", {
registryName: acrname,
resourceGroupName: resgrpName,
sku: {
name: "Premium"
},
adminUserEnabled: false
});
salmon-raincoat-19475
11/08/2021, 3:21 PMaws:region
and aws:profile
for a project, as opposed to in each stack?brave-angle-33257
11/08/2021, 5:17 PM/data/pulumi
directory built into my container:
error: Error: Error reading file '/data/pulumi/infra/aws/projects/sitebuilder/environment/apigateway/package.json' when computing package dependencies. Error: ENOENT: no such file or directory, open '/data/pulumi/infra/aws/projects/sitebuilder/environment/apigateway/package.json'
at readFile (/data/pulumi/node_modules/@pulumi/pulumi/runtime/closure/codePaths.js:167:19)
at computeDependenciesDirectlyFromPackageFile (/data/pulumi/node_modules/@pulumi/pulumi/runtime/closure/codePaths.js:150:22)
at /data/pulumi/node_modules/@pulumi/pulumi/runtime/closure/codePaths.js:115:36
at /data/pulumi/node_modules/read-package-tree/rpt.js:162:20
sparse-intern-71089
11/08/2021, 5:23 PMfew-army-64952
11/08/2021, 6:15 PMhigh-holiday-63390
11/08/2021, 7:23 PMsparse-beach-51011
11/08/2021, 8:55 PMsparse-beach-51011
11/08/2021, 8:55 PM