Skip to content

Commit

Permalink
renamed domain param
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnichase committed Jun 13, 2024
1 parent 52e037f commit 8fb72b0
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/got-api/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default $config({
codePath: path.join(process.cwd(), 'dist/lambda/zips'),
forceStoreDestroy: true,
fileHosting: {
url: fileHosting.url,
domain: fileHosting.domain,
bucketName: fileHosting.bucketName,
privateKeyId: fileHosting.privateKeyId,
privateKeyParameterName: fileHosting.privateKeyParameterName,
Expand All @@ -57,7 +57,7 @@ export default $config({

return {
apiUrl: pulumi.interpolate`https://${api.endpoint}`,
fileHostingUrl: pulumi.interpolate`https://${fileHosting.url}`,
fileHostingUrl: pulumi.interpolate`https://${fileHosting.domain}`,
};
},
});
Expand Down
5 changes: 2 additions & 3 deletions packages/pulumi-gotiac-aws/provider/pkg/provider/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ type ApiArgs struct {
}

type ApiFileHostingInput struct {
// Bucket *s3.Bucket `pulumi:"bucket"`
Url pulumi.StringInput `pulumi:"url"`
Domain pulumi.StringInput `pulumi:"domain"`
PrivateKeyParameterName pulumi.StringInput `pulumi:"privateKeyParameterName"`
PrivateKeyId pulumi.StringInput `pulumi:"privateKeyId"`
BucketName pulumi.StringInput `pulumi:"bucketName"`
Expand Down Expand Up @@ -323,7 +322,7 @@ func NewApi(ctx *pulumi.Context,
if args.FileHosting != nil {
cloudfrontAccessKeyId = args.FileHosting.PrivateKeyId.ToStringOutput()
cloudfrontNewAccessKeyParameter = args.FileHosting.PrivateKeyParameterName.ToStringOutput()
mediaDomain = args.FileHosting.Url.ToStringOutput()
mediaDomain = args.FileHosting.Domain.ToStringOutput()
bucketMediaName = &args.FileHosting.BucketName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type FileHostingArgs struct {
type FileHosting struct {
pulumi.ResourceState

Url pulumi.StringOutput `pulumi:"url"`
Domain pulumi.StringOutput `pulumi:"domain"`
PrivateKeyParameterName pulumi.StringOutput `pulumi:"privateKeyParameterName"`
PrivateKeyId pulumi.StringOutput `pulumi:"privateKeyId"`
BucketName pulumi.StringOutput `pulumi:"bucketName"`
Expand Down Expand Up @@ -349,13 +349,14 @@ func NewFileHosting(ctx *pulumi.Context,

component.PrivateKeyParameterName = fileHostingKeyParameter.Name
component.PrivateKeyId = pulumi.StringOutput(publicKey.ID())
component.Url = args.Domain.ToStringOutput()
component.Domain = args.Domain.ToStringOutput()
component.BucketName = bucketName.ToStringOutput()

if err := ctx.RegisterResourceOutputs(component, pulumi.Map{
"url": component.Url,
"domain": component.Domain,
"privateKeyParameterName": component.PrivateKeyParameterName,
"privateKeyId": component.PrivateKeyId,
"bucketName": component.BucketName,
}); err != nil {
return nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions packages/pulumi-gotiac-aws/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ types:
gotiac:index:ApiFileHostingInput:
type: object
properties:
url:
domain:
type: string
description: The file hosting domain.
privateKeyId:
Expand All @@ -19,7 +19,7 @@ types:
type: string
description: The name of the created media bucket that is used to store files.
required:
- url
- domain
- privateKeyId
- privateKeyParameterName
- bucketName
Expand Down Expand Up @@ -122,7 +122,7 @@ resources:
requiredInputs:
- domain
properties:
url:
domain:
type: string
description: The file hosting domain.
privateKeyId:
Expand All @@ -135,7 +135,7 @@ resources:
type: string
description: The name of the created media bucket that is used to store files.
required:
- url
- domain
- privateKeyId
- privateKeyParameterName
- bucketName
Expand Down
8 changes: 4 additions & 4 deletions packages/pulumi-gotiac-aws/sdk/nodejs/bin/fileHosting.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export declare class FileHosting extends pulumi.ComponentResource {
* The name of the created media bucket that is used to store files.
*/
readonly bucketName: pulumi.Output<string>;
/**
* The file hosting domain.
*/
readonly domain: pulumi.Output<string>;
/**
* The ID of the private key which is used to identify which key was used to sign a URL.
*/
Expand All @@ -20,10 +24,6 @@ export declare class FileHosting extends pulumi.ComponentResource {
* The ssm parameter name for the private key that is used to sign upload and download URLs.
*/
readonly privateKeyParameterName: pulumi.Output<string>;
/**
* The file hosting domain.
*/
readonly url: pulumi.Output<string>;
/**
* Create a FileHosting resource with the given unique name, arguments, and options.
*
Expand Down
3 changes: 1 addition & 2 deletions packages/pulumi-gotiac-aws/sdk/nodejs/bin/fileHosting.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/pulumi-gotiac-aws/sdk/nodejs/bin/types/input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ export interface ApiFileHostingInputArgs {
* The name of the created media bucket that is used to store files.
*/
bucketName: pulumi.Input<string>;
/**
* The file hosting domain.
*/
domain: pulumi.Input<string>;
/**
* The ID of the private key which is used to identify which key was used to sign a URL.
*/
Expand All @@ -12,8 +16,4 @@ export interface ApiFileHostingInputArgs {
* The ssm parameter name for the private key that is used to sign upload and download URLs.
*/
privateKeyParameterName: pulumi.Input<string>;
/**
* The file hosting domain.
*/
url: pulumi.Input<string>;
}
11 changes: 5 additions & 6 deletions packages/pulumi-gotiac-aws/sdk/nodejs/fileHosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export class FileHosting extends pulumi.ComponentResource {
* The name of the created media bucket that is used to store files.
*/
public readonly bucketName!: pulumi.Output<string>;
/**
* The file hosting domain.
*/
public readonly domain!: pulumi.Output<string>;
/**
* The ID of the private key which is used to identify which key was used to sign a URL.
*/
Expand All @@ -34,10 +38,6 @@ export class FileHosting extends pulumi.ComponentResource {
* The ssm parameter name for the private key that is used to sign upload and download URLs.
*/
public readonly /*out*/ privateKeyParameterName!: pulumi.Output<string>;
/**
* The file hosting domain.
*/
public readonly /*out*/ url!: pulumi.Output<string>;

/**
* Create a FileHosting resource with the given unique name, arguments, and options.
Expand All @@ -58,12 +58,11 @@ export class FileHosting extends pulumi.ComponentResource {
resourceInputs['forceDestroyBucket'] = args ? args.forceDestroyBucket : undefined;
resourceInputs['privateKeyId'] = undefined /*out*/;
resourceInputs['privateKeyParameterName'] = undefined /*out*/;
resourceInputs['url'] = undefined /*out*/;
} else {
resourceInputs['bucketName'] = undefined /*out*/;
resourceInputs['domain'] = undefined /*out*/;
resourceInputs['privateKeyId'] = undefined /*out*/;
resourceInputs['privateKeyParameterName'] = undefined /*out*/;
resourceInputs['url'] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FileHosting.__pulumiType, name, resourceInputs, opts, true /*remote*/);
Expand Down
8 changes: 4 additions & 4 deletions packages/pulumi-gotiac-aws/sdk/nodejs/types/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export interface ApiFileHostingInputArgs {
* The name of the created media bucket that is used to store files.
*/
bucketName: pulumi.Input<string>;
/**
* The file hosting domain.
*/
domain: pulumi.Input<string>;
/**
* The ID of the private key which is used to identify which key was used to sign a URL.
*/
Expand All @@ -18,8 +22,4 @@ export interface ApiFileHostingInputArgs {
* The ssm parameter name for the private key that is used to sign upload and download URLs.
*/
privateKeyParameterName: pulumi.Input<string>;
/**
* The file hosting domain.
*/
url: pulumi.Input<string>;
}

0 comments on commit 8fb72b0

Please sign in to comment.