fresh-carpet-17788
08/03/2022, 10:13 AMbig-potato-91793
08/03/2022, 3:28 PM5.10
and pulumi 3.35.3
with those value
skipCredentialsValidation: false,
skipGetEc2Platforms: false,
skipMetadataApiCheck: false,
with EC2 Instance Metadata (iam role on the instance)
It was working before I upgrade all version.
Anything wrong?broad-toddler-72261
08/03/2022, 6:49 PMvictorious-dusk-75271
08/03/2022, 8:32 PMbreezy-laptop-42679
08/04/2022, 2:05 PM[6:11 PM] /*
* s3 public access block
*/
const bucketNameList = ["prod-nueve-media-9184fce"]
const bucketIdList: pulumi.Output<string>[] = []
bucketNameList.forEach(bucketName => {
// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket(bucketName, {});
bucketIdList.push(bucket.id)
});
for (let index = 0; index < bucketIdList.length; index++) {
new aws.s3.BucketPublicAccessBlock(`${bucketNameList[index]}-publicAccessBlock`, {
bucket: bucketIdList[index],
blockPublicAcls: true,
blockPublicPolicy: true,
});
}
aloof-dress-1001
08/04/2022, 4:43 PMkind-hamburger-15227
08/04/2022, 6:45 PMDiagnostics:
aws:s3:Bucket (s3-website-bucket):
error: 1 error occurred:
* error configuring Terraform AWS Provider: AWS account ID not previously found and failed retrieving via all available methods. See <https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id> for workaround and implications. Errors: 2 errors occurred:
I tried adding stack.set_config("aws😒kipCredentialsValidation:", auto.ConfigValue("true")) into main.py but it failed to parse config parameter. Any suggestions?polite-napkin-90098
08/04/2022, 7:04 PMstocky-petabyte-29883
08/04/2022, 8:46 PMnew awsx.ec2.Subnet
or new aws.ec2.Subnet
.
How do we set the subnet name and set the subnet as private or public?helpful-account-44059
08/05/2022, 7:56 AMlimited-motorcycle-11738
08/05/2022, 10:45 AMstocky-petabyte-29883
08/05/2022, 2:21 PMnew remote.Command("mysql-setup-execute", {
connection,
create: pulumi.interpolate`chmod 777 ./mysql-setup.sh; ./mysql-setup.sh`,
delete: "rm mysql-setup.sh",
environment: {
MASTER_USER: masterUsername,
MASTER_PASSWORD: masterPassword!,
DB_USERNAME: dbUsername,
DB_PASSWORD: dbUserPassword,
DB_NAME: dbName,
DB_HOST: dbHost
}
}, { dependsOn: remoteFile });
Shell script
#!/bin/bash
sudo yum -y install mariadb
mysql -u ${MASTER_USER} -p${MASTER_PASSWORD} -h${DB_HOST}<<MYSQL_SCRIPT
CREATE USER ${DB_USERNAME}@% IDENTIFIED BY '${DB_PASSWORD}';
GRANT ALL PRIVILEGES ON ${DB_NAME}.* TO '${USERNAME}'@'%';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
What am I missing?brainy-furniture-43093
08/05/2022, 4:23 PMGOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -tags lambda.norpc -o build/bootstrap
And then I zip it using Pulumi's NewAssetArchive
Code: pulumi.NewAssetArchive(map[string]interface{}{
"bootstrap": pulumi.NewFileAsset("../onboarding/cmd/onboarding/build/bootstrap"),
"Makefile": pulumi.NewFileAsset("../onboarding/cmd/onboarding/build/Makefile"),
}),
And my Makefile contains
build-Onboarding:
cp ./bootstrap $(ARTIFACTS_DIR)/.
But for some reason it's like my Makefile doesn't execute then the bootstrap file stays in some root folder.
Any ideas here? Thank youbrainy-furniture-43093
08/05/2022, 4:25 PMfamous-magician-5742
08/05/2022, 5:09 PMpulumi login
) support using the Lambda execution IAM role to authenticate 'seamlessly' to the s3 bucket where the state is stored?victorious-dusk-75271
08/05/2022, 8:11 PMvictorious-dusk-75271
08/05/2022, 8:17 PMvictorious-dusk-75271
08/05/2022, 8:17 PMsquare-ability-48831
08/05/2022, 10:28 PMaws
provider" when trying to import Subnets?
I'm trying to import some default vpc subnets into pulumi control and get this after a pulumi import...
command
pulumi import aws:ec2/subnet:Subnet defaultVpcSubnet2d subnet-BLAHBLAHBLAHBLAH
warning: One or more imported inputs failed to validate. This is almost certainly a bug in the `aws` provider. The import will still proceed, but you will need to edit the generated code after copying it into your program.
warning: aws:ec2/subnet:Subnet resource 'defaultVpcSubnet2d' has a problem: Conflicting configuration arguments: "availability_zone": conflicts with availability_zone_id. Examine values at 'Subnet.AvailabilityZone'.
warning: aws:ec2/subnet:Subnet resource 'defaultVpcSubnet2d' has a problem: Conflicting configuration arguments: "availability_zone_id": conflicts with availability_zone. Examine values at 'Subnet.AvailabilityZoneId'.
careful-oil-55681
08/05/2022, 11:09 PMvictorious-dusk-75271
08/06/2022, 12:57 AMaws:ec2:VpcPeeringConnection (eks-vpc-peer-to-rds-vpc):
error: 1 error occurred:
* updating urn:pulumi:dev::allrites-infrastructure::custom:resource:vpc$aws:ec2/vpcPeeringConnection:VpcPeeringConnection::eks-vpc-peer-to-rds-vpc: 1 error occurred:
* error reading EC2 VPC Peering Connection (pcx-093563ee7db421f17): failed
any idea what causing this error?victorious-dusk-75271
08/06/2022, 2:49 AMDiagnostics:
aws:ec2:Vpc (rds-vpc-vpc):
error: deleting urn:pulumi:dev::allrites-infrastructure::aws:ec2/vpc:Vpc::rds-vpc-vpc: 1 error occurred:
* error deleting EC2 VPC (vpc-076d9d57f5bfecac7): DependencyViolation: The vpc 'vpc-076d9d57f5bfecac7' has dependencies and cannot be deleted.
status code: 400, request id: 8f586580-0c6f-4134-8606-e2c3aaa0c19f
pulumi:pulumi:Stack (allrites-infrastructure-dev):
error: update failed
how do i solve this problem?victorious-dusk-75271
08/06/2022, 2:49 AM- ├─ aws:ec2:Vpc rds-vpc-vpc delete completing deletion fro
victorious-dusk-75271
08/06/2022, 8:45 AMvictorious-dusk-75271
08/06/2022, 8:45 AMvictorious-dusk-75271
08/06/2022, 9:01 AMaws:ec2:VpcPeeringConnection (us-data-vpc-peer-to-primary-data-vpc):
error: 1 error occurred:
* updating urn:pulumi:dev::allrites-infrastructure::custom:resource:vpc$aws:ec2/vpcPeeringConnection:VpcPeeringConnection::us-data-vpc-peer-to-primary-data-vpc: 1 error occurred:
* Unable to modify EC2 VPC Peering Connection Options. EC2 VPC Peering Connection (pcx-074aa1572a7fa6704) is not active (current status: pending-acceptance). Please set the `auto_accept` attribute to `true` or activate the EC2 VPC Peering Connection manually.
how do i solve this problem?victorious-dusk-75271
08/06/2022, 9:01 AMquaint-air-36266
08/08/2022, 9:56 AMcolossal-vr-62639
08/08/2022, 2:06 PMstocky-petabyte-29883
08/09/2022, 8:48 AMconst setEnvVarsCommand = new remote.Command("set-env-vars", {connection,
create: pulumi.interpolate`echo "export MASTER_USER='"test"'\nexport MASTER_PASSWORD='test'\nexport DB_USERNAME='test'\nexport DB_PASSWORD='test'\nexport DB_NAME='test'\nexport DB_HOST='test'" >> ~/.bashrc && source ~/.bashrc && echo "AcceptEnv MASTER_USER MASTER_PASSWORD DB_USERNAME DB_PASSWORD DB_NAME DB_HOST" | sudo tee -a /etc/ssh/sshd_config && sudo service sshd restart`,
delete: `head -n -6 ~/.bashrc > tmp_file && mv tmp_file ~/.bashrc && head -n -1 ~/.bashrc > tmp_sshd && sudo mv tmp_sshd /etc/ssh/sshd_config`
}, { dependsOn: remoteFile });
new remote.Command("mysql-setup-execute", {connection,
create: pulumi.interpolate`chmod 777 ./mysql-setup.sh; ./mysql-setup.sh`,
delete: "rm mysql-setup.sh",
environment: {
MASTER_USER: masterUsername,
MASTER_PASSWORD: masterPassword!,
DB_USERNAME: dbUsername,
DB_PASSWORD: dbUserPassword,
DB_NAME: dbName,
DB_HOST: dbHost
}
}, { dependsOn: setEnvVarsCommand });
I am dumping all the env variables available in the mysql-setup.sh file and the environment variables have the place holder value test.
I went with AcceptEnv as people recommended it in the issue https://github.com/pulumi/pulumi-command/issues/48
I am stuck here and need some helpstocky-petabyte-29883
08/09/2022, 8:48 AMconst setEnvVarsCommand = new remote.Command("set-env-vars", {connection,
create: pulumi.interpolate`echo "export MASTER_USER='"test"'\nexport MASTER_PASSWORD='test'\nexport DB_USERNAME='test'\nexport DB_PASSWORD='test'\nexport DB_NAME='test'\nexport DB_HOST='test'" >> ~/.bashrc && source ~/.bashrc && echo "AcceptEnv MASTER_USER MASTER_PASSWORD DB_USERNAME DB_PASSWORD DB_NAME DB_HOST" | sudo tee -a /etc/ssh/sshd_config && sudo service sshd restart`,
delete: `head -n -6 ~/.bashrc > tmp_file && mv tmp_file ~/.bashrc && head -n -1 ~/.bashrc > tmp_sshd && sudo mv tmp_sshd /etc/ssh/sshd_config`
}, { dependsOn: remoteFile });
new remote.Command("mysql-setup-execute", {connection,
create: pulumi.interpolate`chmod 777 ./mysql-setup.sh; ./mysql-setup.sh`,
delete: "rm mysql-setup.sh",
environment: {
MASTER_USER: masterUsername,
MASTER_PASSWORD: masterPassword!,
DB_USERNAME: dbUsername,
DB_PASSWORD: dbUserPassword,
DB_NAME: dbName,
DB_HOST: dbHost
}
}, { dependsOn: setEnvVarsCommand });
I am dumping all the env variables available in the mysql-setup.sh file and the environment variables have the place holder value test.
I went with AcceptEnv as people recommended it in the issue https://github.com/pulumi/pulumi-command/issues/48
I am stuck here and need some helplittle-cartoon-10569
08/09/2022, 8:54 PM