@@ -316,7 +316,7 @@ func (b *ByocAws) environment() map[string]string {
316
316
"DEFANG_ORG" : b .TenantID ,
317
317
"DOMAIN" : b .ProjectDomain ,
318
318
"PRIVATE_DOMAIN" : b .PrivateDomain ,
319
- "PROJECT" : b .PulumiProject , // may be empty
319
+ "PROJECT" : b .ProjectName , // may be empty
320
320
"PULUMI_BACKEND_URL" : fmt .Sprintf (`s3://%s?region=%s&awssdk=v2` , b .bucketName (), region ),
321
321
"PULUMI_CONFIG_PASSPHRASE" : pkg .Getenv ("PULUMI_CONFIG_PASSPHRASE" , "asdf" ), // TODO: make customizable
322
322
"STACK" : b .PulumiStack ,
@@ -356,8 +356,8 @@ func (b *ByocAws) Delete(ctx context.Context, req *defangv1.DeleteRequest) (*def
356
356
357
357
// stackDir returns a stack-qualified path, like the Pulumi TS function `stackDir`
358
358
func (b * ByocAws ) stackDir (name string ) string {
359
- ensure (b .PulumiProject != "" , "pulumiProject not set" )
360
- return fmt .Sprintf ("/%s/%s/%s/%s" , byoc .DefangPrefix , b .PulumiProject , b .PulumiStack , name ) // same as shared/common.ts
359
+ ensure (b .ProjectName != "" , "pulumiProject not set" )
360
+ return fmt .Sprintf ("/%s/%s/%s/%s" , byoc .DefangPrefix , b .ProjectName , b .PulumiStack , name ) // same as shared/common.ts
361
361
}
362
362
363
363
func (b * ByocAws ) GetServices (ctx context.Context ) (* defangv1.ListServicesResponse , error ) {
@@ -376,8 +376,8 @@ func (b *ByocAws) GetServices(ctx context.Context) (*defangv1.ListServicesRespon
376
376
377
377
s3Client := s3 .NewFromConfig (cfg )
378
378
// Path to the state file, Defined at: https://github.com/DefangLabs/defang-mvp/blob/main/pulumi/cd/byoc/aws/index.ts#L89
379
- ensure (b .PulumiProject != "" , "pulumiProject not set" )
380
- path := fmt .Sprintf ("projects/%s/%s/project.pb" , b .PulumiProject , b .PulumiStack )
379
+ ensure (b .ProjectName != "" , "ProjectName not set" )
380
+ path := fmt .Sprintf ("projects/%s/%s/project.pb" , b .ProjectName , b .PulumiStack )
381
381
382
382
term .Debug ("Getting services from bucket:" , bucketName , path )
383
383
getObjectOutput , err := s3Client .GetObject (ctx , & s3.GetObjectInput {
@@ -518,11 +518,11 @@ func (b *ByocAws) update(ctx context.Context, service *defangv1.Service) (*defan
518
518
return nil , fmt .Errorf ("missing config %q" , missing ) // retryable CodeFailedPrecondition
519
519
}
520
520
521
- ensure (b .PulumiProject != "" , "pulumiProject not set" )
521
+ ensure (b .ProjectName != "" , "ProjectName not set" )
522
522
si := & defangv1.ServiceInfo {
523
523
Service : service ,
524
- Project : b .PulumiProject , // was: tenant
525
- Etag : pkg .RandomID (), // TODO: could be hash for dedup/idempotency
524
+ Project : b .ProjectName , // was: tenant
525
+ Etag : pkg .RandomID (), // TODO: could be hash for dedup/idempotency
526
526
}
527
527
528
528
hasHost := false
@@ -636,10 +636,10 @@ func (b *ByocAws) getPrivateFqdn(fqn qualifiedName) string {
636
636
}
637
637
638
638
func (b * ByocAws ) getProjectDomain (zone string ) string {
639
- if b .PulumiProject == "" {
639
+ if b .ProjectName == "" {
640
640
return "" // no project name => no custom domain
641
641
}
642
- projectLabel := byoc .DnsSafeLabel (b .PulumiProject )
642
+ projectLabel := byoc .DnsSafeLabel (b .ProjectName )
643
643
if projectLabel == byoc .DnsSafeLabel (b .TenantID ) {
644
644
return byoc .DnsSafe (zone ) // the zone will already have the tenant ID
645
645
}
0 commit comments