Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
12bd0dd
Create acm certificate v2 component
bornast Dec 5, 2025
b8b8d94
Implement acm certificate tests
bornast Dec 5, 2025
431039c
Add legacy prefix to certificate v1 component
bornast Dec 5, 2025
6249fa5
Add subjectAlternativeNames option arg
bornast Dec 9, 2025
710a102
Add test for cert with SANs
bornast Dec 9, 2025
1c98b9e
Add acm certificate namespace for types
bornast Dec 10, 2025
06184a8
Remove legacy prefix from v1 certificate component
bornast Dec 10, 2025
50ff252
Rename test assertions
bornast Dec 10, 2025
5082c38
Fallback to hosted zone id arg if zone is not found by domain name
bornast Dec 10, 2025
266a103
Merge branch 'task/certificate-v2-component' into task/certificate-v2…
bornast Dec 10, 2025
46ca7e8
Fix get zone method args
bornast Dec 10, 2025
80e5f92
Merge branch 'task/certificate-v2-component' into task/certificate-v2…
bornast Dec 10, 2025
9a82628
Refactor get zone method args
bornast Dec 10, 2025
359a94b
Add ICB prefix to env variables
bornast Dec 10, 2025
2497cc5
Merge branch 'task/certificate-v2-component' into task/certificate-v2…
bornast Dec 10, 2025
034c447
Fix method name typo
bornast Dec 10, 2025
e56724e
Export certificate using esmodule syntax
bornast Dec 16, 2025
5c53176
Merge branch task/certificate-v2-component into task/certificate-v2-s…
bornast Dec 16, 2025
1eee025
Update web server builder with cert method
bornast Jan 1, 2026
b8ef5e8
Enable san record creation from cert
bornast Jan 1, 2026
868ecb5
Implement tests for web server components with certificates
bornast Jan 1, 2026
9704602
Add docs for certificate and domain args edge case
bornast Jan 1, 2026
6fc989d
Remove publicSubnetIds arg
bornast Jan 1, 2026
ec7aba0
Refactor ecs service creation method
bornast Jan 1, 2026
ce4031b
Add load balancing algorithm argument
bornast Jan 1, 2026
9348fe8
Resolve lb algorithm assertion error
bornast Jan 1, 2026
99e85c5
Rephrase assertion text
bornast Jan 1, 2026
cb1a408
Bump pulumi aws and awsx dependencies
bornast Jan 6, 2026
7ab813a
Replace all occurrences of project with vpc component
bornast Jan 6, 2026
58c134c
Add region arg to certificate component
bornast Jan 6, 2026
4a786f5
Update load balancer listener ssl policy (#111)
bornast Jan 9, 2026
fbf61a3
Merge branch 'master' into task/certificate-v2-component
bornast Jan 9, 2026
18fa3b6
Move setup to the top-level to prevent false positives
bornast Jan 9, 2026
ded476b
Merge branch 'task/certificate-v2-component' into task/certificate-v2…
bornast Jan 9, 2026
eea55c9
Merge branch 'task/certificate-v2-san-arg' into task/web-server-args
bornast Jan 9, 2026
7fd0a71
Merge branch 'task/web-server-args' into task/bump-pulumi-aws-provider
bornast Jan 9, 2026
663cbe3
Merge branch 'task/bump-pulumi-aws-provider' into feat/acm-certificat…
bornast Jan 9, 2026
0706a99
Merge branch 'master' into feat/acm-certificate-support-region
bornast Jan 14, 2026
f91a03c
test: add region certificate test
bornast Jan 14, 2026
6d73cd5
test: update test assertion
bornast Jan 14, 2026
d040a21
test: update test infrastructure args
bornast Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/v2/components/acm-certificate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export namespace AcmCertificate {
*/
subjectAlternativeNames?: pulumi.Input<string>[];
hostedZoneId: pulumi.Input<string>;
region?: pulumi.Input<string>;
};
}

Expand All @@ -29,19 +30,25 @@ export class AcmCertificate extends pulumi.ComponentResource {
domainName: args.domain,
subjectAlternativeNames: args.subjectAlternativeNames,
validationMethod: 'DNS',
region: args.region,
tags: commonTags,
},
{ parent: this },
);

this.createCertValidationRecords(args.domain, args.hostedZoneId);
this.createCertValidationRecords(
args.domain,
args.hostedZoneId,
args.region,
);

this.registerOutputs();
}

private createCertValidationRecords(
domainName: AcmCertificate.Args['domain'],
hostedZoneId: AcmCertificate.Args['hostedZoneId'],
region: AcmCertificate.Args['region'],
) {
this.certificate.domainValidationOptions.apply(domains => {
const validationRecords = domains.map(
Expand All @@ -67,6 +74,7 @@ export class AcmCertificate extends pulumi.ComponentResource {
{
certificateArn: this.certificate.arn,
validationRecordFqdns: validationRecords.map(record => record.fqdn),
region,
},
{ parent: this },
);
Expand Down
19 changes: 19 additions & 0 deletions tests/acm-certificate/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { alternateRegion } from './infrastructure/config';
import * as assert from 'node:assert';
import * as automation from '../automation';
import { InlineProgramArgs } from '@pulumi/pulumi/automation';
Expand Down Expand Up @@ -37,6 +38,7 @@ const ctx: AcmCertificateTestContext = {
},
clients: {
acm: new ACMClient({ region }),
acmAlternateRegion: new ACMClient({ region: alternateRegion }),
route53: new Route53Client({ region }),
},
};
Expand Down Expand Up @@ -139,4 +141,21 @@ describe('ACM Certificate component deployment', () => {
'Certificate should include all expected domains',
);
});

it('should create certificate in alternate region', async () => {
const certificate = ctx.outputs.regionCertificate.value;
assert.ok(certificate.certificate, 'Should have certificate property');
assert.ok(certificate.certificate.arn, 'Certificate should have ARN');

return backOff(async () => {
const certResult = await ctx.clients.acmAlternateRegion.send(
new DescribeCertificateCommand({
CertificateArn: certificate.certificate.arn,
}),
);

const cert = certResult.Certificate;
assert.ok(cert, 'Certificate should exist');
}, ctx.config.exponentialBackOffConfig);
});
});
2 changes: 2 additions & 0 deletions tests/acm-certificate/infrastructure/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const alternateRegion =
process.env.AWS_REGION === 'eu-central-1' ? 'us-west-1' : 'eu-central-1';
9 changes: 8 additions & 1 deletion tests/acm-certificate/infrastructure/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { next as studion } from '@studion/infra-code-blocks';
import * as aws from '@pulumi/aws-v7';
import { alternateRegion } from './config';

const appName = 'acm-certificate-test';

Expand All @@ -24,4 +25,10 @@ const sanCertificate = new studion.AcmCertificate(
},
);

export { certificate, sanCertificate, hostedZone };
const regionCertificate = new studion.AcmCertificate(`${appName}-region-cert`, {
domain: `region.${domainName}`,
hostedZoneId: hostedZone.zoneId,
region: alternateRegion,
});

export { certificate, sanCertificate, regionCertificate, hostedZone };
1 change: 1 addition & 0 deletions tests/acm-certificate/test-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface PulumiProgramContext {
interface AwsContext {
clients: {
acm: ACMClient;
acmAlternateRegion: ACMClient;
route53: Route53Client;
};
}
Expand Down