Skip to content
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

Correct docs for app-delivery & improve usability #1151

Closed
skinny85 opened this issue Nov 12, 2018 · 7 comments
Closed

Correct docs for app-delivery & improve usability #1151

skinny85 opened this issue Nov 12, 2018 · 7 comments
Assignees
Labels
feature-request A feature should be added or improved.

Comments

@skinny85
Copy link
Contributor

  1. (Found by @moofish32 on Gitter) This is wrong:
const project = new codebuild.PipelineProject(pipelineStack, 'CodeBuild', {
  /* ... */
});
const synthesizedApp = project.outputArtifact;

Project doesn't have an outputArtifact property, it's a CodePipeline thing. It's also missing a build Pipeline Stage.

So, it should be something like:

const project = new codebuild.PipelineProject(pipelineStack, 'CodeBuild', {
  /* ... */
});
const buildStage = pipeline.addStage('build');
const buildAction = project.addBuildToPipeline(buildStage, 'CodeBuild');
const synthesizedApp = buildAction.outputArtifact;
  1. It uses import cicd = require('@aws-cdk/cicd');, which doesn't exist anymore (the name was changed).
@RomainMuller
Copy link
Contributor

Über-oops. Thanks for the report! It's probably a good idea to turn this into a literate markdown example if possible (not sure this can be done without incurring dependency cycles, though).

@moofish32
Copy link
Contributor

I would like to make this issue a little broader (include the doc update, but also the major missing feature for IAM).

I created a very simple app-delivery example:

The app is basically a security group that is whitelisting an IP and Port. Think about an old data center stuck application that you need access to in AWS (perhaps it's not even owned by you). This practice of IP whitelisting is a last resort and should generally be avoided, but it's a simple example.

As the IP addresses change you would like the security group automatically updated, because IPs are either owned by the service or not, the concept of semver doesn't really apply to this use case. So imagine you update the repo and this artifact is put in an S3 bucket which you want to update your security group.

The VPC parameter here presents an interesting challenge for the app-delivery package. If you want to provide this pattern in a common place for all accounts in your organization AWS Service Catalog might a good place to interface. That means that you need to allow the account to parameterize VPC ID and thus now you need to update a stack and do the equivalent of user previous value. I am not positive but I assume this lives in the Parameter Overrides.

In order to deploy the security group you will need a base set of permissions passed to the role executing the change set. Today that is the missing feature.

If we really want a separate issue for docs, let me know.

@moofish32
Copy link
Contributor

I can't update title or description -- so if we agree to consolidate can somebody with access take care of that?

moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 13, 2018
 * The changeset and apply changeset may need specific IAM permissions
 and the user can now customize them via `deployStackAction.role`
 * Document updates for proper build stage configuration
 * Fixes aws#1151
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 13, 2018
 * The changeset and apply changeset may need specific IAM permissions
 and the user can now customize them via `deployStackAction.role`
 * Document updates for proper build stage configuration
 * Fixes aws#1151
@moofish32
Copy link
Contributor

For other users hitting this issue you can work around using our escape hatch similar too:

const pipelineActions: cfn.PipelineCreateReplaceChangeSetAction = deployAction.children.
  find( c => (c as cfn.PipelineCreateReplaceChangeSetAction).role !== undefined) as cfn.PipelineCreateReplaceChangeSetAction;

@moofish32
Copy link
Contributor

@RomainMuller and @skinny85 I think we are also going to need to expose capabilities this one is not accessible via overrides as easy.

@RomainMuller RomainMuller changed the title Correct docs for app-delivery Correct docs for app-delivery & improve usability Nov 15, 2018
@RomainMuller
Copy link
Contributor

@moofish32 the capabilities being exposed/settable makes a lot of sense anyway.

@RomainMuller
Copy link
Contributor

We need to give the example in the README.md the literate treatment (hopefully it doesn't imply creating circular dependencies...) so we can maintain guarantee that it at least compiles. I'll get to this once #1165 has landed.

moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 15, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Document updates for proper build stage configuration
 * Fixes aws#1151
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 15, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Document updates for proper build stage configuration
 * Fixes aws#1151
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 16, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 18, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * Require user must set adminPermissions boolean for pipeline action
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 18, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * Require user must set adminPermissions boolean for pipeline action
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 20, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * User must set adminPermissions boolean for pipeline action
 * app-delivery defaults pipelin-action capabilities to AnonymousIAM
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 20, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * User must set adminPermissions boolean for pipeline action
 * app-delivery defaults pipelin-action capabilities to AnonymousIAM
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
moofish32 added a commit to moofish32/aws-cdk that referenced this issue Nov 22, 2018
 * The changeset and apply changeset can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * User must set adminPermissions boolean for pipeline action
 * app-delivery defaults pipelin-action capabilities to AnonymousIAM
 * Document updates for proper build stage configuration
 * Fixes aws#1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
eladb pushed a commit that referenced this issue Nov 28, 2018
* The "changeset" and "apply changeset" actions can now apply role IAM permissions,
 and CloudFormation Capabilities
 * Updated CloudFormationCapabilities enum to include `None`
 * User must set adminPermissions boolean for pipeline action
 * app-delivery defaults pipelin-action capabilities to AnonymousIAM
 * Document updates for proper build stage configuration
 * Fixes #1151

BREAKING CHANGE: `CloudFormationCapabilities.IAM` renamed to
`CloudFormation.AnonymousIAM` and `PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[]` has been changed to
`PipelineCloudFormationDeployActionProps.capabilities?:
CloudFormationCapabilities` no longer an array.
`PipelineCloudFormationDeployActionProps.fullPermissions?:` has been
renamed to `PipelineCloudFormationDeployActionProps.adminPermissions:`
and is required instead of optional.
@srchase srchase added feature-request A feature should be added or improved. and removed enhancement labels Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants