-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: adjust public API #31
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a79c45a
Draft: adjust public API
pgavlin 891856b
plumb options
pgavlin 2d7d941
add an asOutput API to Stack
pgavlin d3a63e0
format code
pgavlin c3db8c5
add an import
pgavlin 4ef2902
update docs + set urn in Stack.constructor
pgavlin c117e73
oops
pgavlin File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ import * as pulumi from '@pulumi/pulumi'; | |
import * as pulumicdk from '@pulumi/cdk'; | ||
import { Construct } from 'constructs'; | ||
import { Service, Source } from '@aws-cdk/aws-apprunner-alpha'; | ||
import { CfnOutput, Stack } from 'aws-cdk-lib'; | ||
import { CfnOutput } from 'aws-cdk-lib'; | ||
|
||
class AppRunnerStack extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
class AppRunnerStack extends pulumicdk.Stack { | ||
url: pulumi.Output<string>; | ||
|
||
constructor(id: string) { | ||
super(id); | ||
|
||
const service = new Service(this, 'service', { | ||
source: Source.fromEcrPublic({ | ||
|
@@ -16,9 +18,11 @@ class AppRunnerStack extends Stack { | |
}), | ||
}); | ||
|
||
new CfnOutput(this, 'url', { value: service.serviceUrl }); | ||
this.url = this.asOutput(service.serviceUrl); | ||
|
||
this.synth(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to at least discover that the stack was not synthesized and emit an error? |
||
} | ||
} | ||
|
||
const stack = new pulumicdk.Stack('teststack', AppRunnerStack); | ||
export const url = stack.outputs['url']; | ||
const stack = new AppRunnerStack('teststack'); | ||
export const url = stack.url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import * as pulumicdk from '@pulumi/cdk'; | ||
import { S3ObjectLambdaStack } from './lib/s3-object-lambda-stack'; | ||
|
||
const s = new pulumicdk.Stack('stack', S3ObjectLambdaStack); | ||
export default s.outputs; | ||
const s = new S3ObjectLambdaStack('stack'); | ||
export const exampleBucketArn = s.exampleBucketArn; | ||
export const objectLambdaArn = s.objectLambdaArn; | ||
export const objectLambdaAccessPointArn = s.objectLambdaAccessPointArn; | ||
export const objectLambdaAccessPointUrl = s.objectLambdaAccessPointUrl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expected this to be
new AppRunnerStack('teststack')
, no?