Skip to content

Injectable SetAdminCustomDomains and SetApiCustomDomains Services#5201

Open
adrians5j wants to merge 24 commits into
nextfrom
adrian/pulumi-custom-domain-abstractions-2026-05-12
Open

Injectable SetAdminCustomDomains and SetApiCustomDomains Services#5201
adrians5j wants to merge 24 commits into
nextfrom
adrian/pulumi-custom-domain-abstractions-2026-05-12

Conversation

@adrians5j
Copy link
Copy Markdown
Member

@adrians5j adrians5j commented May 12, 2026

What changed

Introduces two new injectable DI services — SetAdminCustomDomains and SetApiCustomDomains — that allow users to apply custom CloudFront domain configuration from within a single AdminPulumi or ApiPulumi implementation file. Previously, there was no supported way to wire dynamically-created Pulumi resources (e.g. Route53 records, ACM certificates) to the CloudFront custom domain setup; users had to hardcode values in the static Infra.Admin.CustomDomains JSX extension. The Pulumi execution model for both apps is also updated so implementations run before the CloudFront resource is created, which is required for config modifications to take effect.

Changelog

Dynamically Apply Custom Domains in Admin and API Pulumi Implementations

Custom CloudFront domain configuration can now be applied dynamically from within a standard AdminPulumi or ApiPulumi implementation by injecting the new SetAdminCustomDomains or SetApiCustomDomains service. This makes it possible to create Route53 records and ACM certificates in the same file and wire their Pulumi outputs directly to the CloudFront distribution, without needing hardcoded values or multiple files.

Usage example

// extensions/MyAdminPulumiHandler.ts
import { Ui } from "webiny/infra";
import { AdminPulumi, SetAdminCustomDomains } from "webiny/infra/admin";

class MyAdminPulumiHandlerImpl implements AdminPulumi.Interface {
    constructor(
        private ui: Ui.Interface,
        private setAdminCustomDomains: SetAdminCustomDomains.Interface
    ) {}

    execute(app: any) {
        this.setAdminCustomDomains.execute({
            domains: ["webiny.adriaweb.xyz"],
            sslMethod: "sni-only",
            certificateArn:
                "arn:aws:acm:us-east-1:674320871285:certificate/6c45daa6-a531-4ce8-97b0-477e77dc68f5"
        });
        this.ui.info("🔮 Executing MyAdminPulumiHandler with environment:", app.env);
    }
}

export default AdminPulumi.createImplementation({
    implementation: MyAdminPulumiHandlerImpl,
    dependencies: [Ui, SetAdminCustomDomains]
});

Squash Merge Commit

feat(project-aws): injectable SetAdminCustomDomains and SetApiCustomDomains services (#5201)

@adrians5j adrians5j added this to the 6.4.0 milestone May 12, 2026
@adrians5j adrians5j changed the title adrian/pulumi-custom-domain-abstractions-2026-05-12 Injectable ApplyAdminCustomDomains and ApplyApiCustomDomains Services May 12, 2026
adrians5j and others added 11 commits May 12, 2026 13:10
… github.com:webiny/webiny-js into adrian/pulumi-custom-domain-abstractions-2026-05-12

# Conflicts:
#	packages/project-aws/src/pulumi/apps/admin/createAdminPulumiApp.ts
#	packages/project-aws/src/pulumi/apps/api/createApiPulumiApp.ts
… github.com:webiny/webiny-js into adrian/pulumi-custom-domain-abstractions-2026-05-12
… github.com:webiny/webiny-js into adrian/pulumi-custom-domain-abstractions-2026-05-12
@adrians5j adrians5j changed the title Injectable ApplyAdminCustomDomains and ApplyApiCustomDomains Services Injectable SetAdminCustomDomains and SetApiCustomDomains Services May 13, 2026
@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB 🔄 Deploying... -
DDB+OS 🔄 Deploying... -

@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB 🔄 Deploying... -
DDB+OS 🔄 Deploying... -

adrians5j added 2 commits May 13, 2026 17:33
… github.com:webiny/webiny-js into adrian/pulumi-custom-domain-abstractions-2026-05-12
@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB ✅ Ready https://drzio4qlxtwb9.cloudfront.net
DDB+OS ✅ Ready https://d2vxwaeyp3bvym.cloudfront.net

@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB ✅ Ready https://d1yu4svsgun8sb.cloudfront.net
DDB+OS ✅ Ready https://d26i3ihid50c8z.cloudfront.net

@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB ✅ Ready https://d1sluv224my1c0.cloudfront.net
DDB+OS ✅ Ready https://dwnz54tzlexvp.cloudfront.net

@adrians5j
Copy link
Copy Markdown
Member Author

/e2e

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB ✅ Ready https://d14owyvggmelgj.cloudfront.net
DDB+OS ✅ Ready https://d1bw2c15luf9lm.cloudfront.net

adrians5j added 4 commits May 14, 2026 06:23
… github.com:webiny/webiny-js into adrian/pulumi-custom-domain-abstractions-2026-05-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant