Skip to content

Commit 6dfc254

Browse files
authored
feat(servicecatalog): Service Catalog is now in Developer Preview (#19204)
Update some `README` documentation based on feedback. Move library to developer preview with no anticipation of breaking changes. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 3382e99 commit 6dfc254

File tree

2 files changed

+64
-61
lines changed

2 files changed

+64
-61
lines changed

packages/@aws-cdk/aws-servicecatalog/README.md

+63-60
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
>
1010
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib
1111
12-
![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)
12+
![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge)
1313

14-
> The APIs of higher level constructs in this module are experimental and under active development.
15-
> They are subject to non-backward compatible changes or removal in any future version. These are
16-
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
17-
> announced in the release notes. This means that while you may use them, you may need to update
18-
> your source code when upgrading to a newer version of this package.
14+
> The APIs of higher level constructs in this module are in **developer preview** before they
15+
> become stable. We will only make breaking changes to address unforeseen API issues. Therefore,
16+
> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes
17+
> will be announced in release notes. This means that while you may use them, you may need to
18+
> update your source code when upgrading to a newer version of this package.
1919
2020
---
2121

@@ -37,7 +37,7 @@ enables organizations to create and manage catalogs of products for their end us
3737
- [Constraints](#constraints)
3838
- [Tag update constraint](#tag-update-constraint)
3939
- [Notify on stack events](#notify-on-stack-events)
40-
- [CloudFormation parameters constraint](#cloudformation-parameters-constraint)
40+
- [CloudFormation template parameters constraint](#cloudformation-template-parameters-constraint)
4141
- [Set launch role](#set-launch-role)
4242
- [Deploy with StackSets](#deploy-with-stacksets)
4343

@@ -50,72 +50,74 @@ import * as servicecatalog from '@aws-cdk/aws-servicecatalog';
5050

5151
## Portfolio
5252

53-
AWS Service Catalog portfolios allow admins to manage products that their end users have access to.
53+
AWS Service Catalog portfolios allow administrators to organize, manage, and distribute cloud resources for their end users.
5454
Using the CDK, a new portfolio can be created with the `Portfolio` construct:
5555

5656
```ts
57-
new servicecatalog.Portfolio(this, 'MyFirstPortfolio', {
58-
displayName: 'MyFirstPortfolio',
57+
new servicecatalog.Portfolio(this, 'Portfolio', {
58+
displayName: 'MyPortfolio',
5959
providerName: 'MyTeam',
6060
});
6161
```
6262

63-
You can also specify properties such as `description` and `acceptLanguage`
63+
You can also specify optional metadata properties such as `description` and `messageLanguage`
6464
to help better catalog and manage your portfolios.
6565

6666
```ts
67-
new servicecatalog.Portfolio(this, 'MyFirstPortfolio', {
67+
new servicecatalog.Portfolio(this, 'Portfolio', {
6868
displayName: 'MyFirstPortfolio',
69-
providerName: 'MyTeam',
69+
providerName: 'SCAdmin',
7070
description: 'Portfolio for a project',
7171
messageLanguage: servicecatalog.MessageLanguage.EN,
7272
});
7373
```
7474

7575
Read more at [Creating and Managing Portfolios](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios.html).
7676

77-
A portfolio that has been created outside the stack can be imported into your CDK app.
78-
Portfolios can be imported by their ARN via the `Portfolio.fromPortfolioArn()` API:
77+
To import an existing portfolio into your CDK application, use the `Portfolio.fromPortfolioArn()` factory method:
7978

8079
```ts
81-
const portfolio = servicecatalog.Portfolio.fromPortfolioArn(this, 'MyImportedPortfolio',
80+
const portfolio = servicecatalog.Portfolio.fromPortfolioArn(this, 'ImportedPortfolio',
8281
'arn:aws:catalog:region:account-id:portfolio/port-abcdefghi');
8382
```
8483

8584
### Granting access to a portfolio
8685

87-
You can manage end user access to a portfolio by granting permissions to `IAM` entities like a user, group, or role.
86+
You can grant access to and manage the `IAM` users, groups, or roles that have access to the products within a portfolio.
87+
Entities with granted access will be able to utilize the portfolios resources and products via the console or AWS CLI.
8888
Once resources are deployed end users will be able to access them via the console or service catalog CLI.
8989

9090
```ts fixture=basic-portfolio
9191
import * as iam from '@aws-cdk/aws-iam';
9292

93-
const user = new iam.User(this, 'MyUser');
93+
const user = new iam.User(this, 'User');
9494
portfolio.giveAccessToUser(user);
9595

96-
const role = new iam.Role(this, 'MyRole', {
96+
const role = new iam.Role(this, 'Role', {
9797
assumedBy: new iam.AccountRootPrincipal(),
9898
});
9999
portfolio.giveAccessToRole(role);
100100

101-
const group = new iam.Group(this, 'MyGroup');
101+
const group = new iam.Group(this, 'Group');
102102
portfolio.giveAccessToGroup(group);
103103
```
104104

105105
### Sharing a portfolio with another AWS account
106106

107-
A portfolio can be programatically shared with other accounts so that specified users can also access it:
107+
You can use account-to-account sharing to distribute a reference to your portfolio to other AWS accounts by passing the recipient account number.
108+
After the share is initiated, the recipient account can accept the share via CLI or console by importing the portfolio ID.
109+
Changes made to the shared portfolio will automatically propagate to recipients.
108110

109111
```ts fixture=basic-portfolio
110112
portfolio.shareWithAccount('012345678901');
111113
```
112114

113115
## Product
114116

115-
Products are the resources you are allowing end users to provision and utilize.
117+
Products are version friendly infrastructure-as-code templates that admins create and add to portfolios for end users to provision and create AWS resources.
116118
The CDK currently only supports adding products of type Cloudformation product.
117119
Using the CDK, a new Product can be created with the `CloudFormationProduct` construct.
118-
`CloudFormationTemplate.fromUrl` can be utilized to create a Product using a Cloudformation template directly from an URL:
120+
You can use `CloudFormationTemplate.fromUrl` to create a Product from a CloudFormation template directly from a URL that points to the template in S3, GitHub, or CodeCommit:
119121

120122
```ts
121123
const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct', {
@@ -133,14 +135,14 @@ const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct',
133135

134136
### Creating a product from a local asset
135137

136-
A `CloudFormationProduct` can also be created using a Cloudformation template from an Asset.
138+
A `CloudFormationProduct` can also be created by using a CloudFormation template held locally on disk using Assets.
137139
Assets are files that are uploaded to an S3 Bucket before deployment.
138140
`CloudFormationTemplate.fromAsset` can be utilized to create a Product by passing the path to a local template file on your disk:
139141

140142
```ts
141143
import * as path from 'path';
142144

143-
const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct', {
145+
const product = new servicecatalog.CloudFormationProduct(this, 'Product', {
144146
productName: "My Product",
145147
owner: "Product Owner",
146148
productVersions: [
@@ -159,10 +161,10 @@ const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct',
159161

160162
### Creating a product from a stack
161163

162-
You can define a service catalog `CloudFormationProduct` entirely within CDK using a service catalog `ProductStack`.
164+
You can create a Service Catalog `CloudFormationProduct` entirely defined with CDK code using a service catalog `ProductStack`.
163165
A separate child stack for your product is created and you can add resources like you would for any other CDK stack,
164166
such as an S3 Bucket, IAM roles, and EC2 instances. This stack is passed in as a product version to your
165-
product. This will not create a separate stack during deployment.
167+
product. This will not create a separate CloudFormation stack during deployment.
166168

167169
```ts
168170
import * as s3 from '@aws-cdk/aws-s3';
@@ -176,7 +178,7 @@ class S3BucketProduct extends servicecatalog.ProductStack {
176178
}
177179
}
178180

179-
const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct', {
181+
const product = new servicecatalog.CloudFormationProduct(this, 'Product', {
180182
productName: "My Product",
181183
owner: "Product Owner",
182184
productVersions: [
@@ -190,21 +192,21 @@ const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct',
190192

191193
### Adding a product to a portfolio
192194

193-
You add products to a portfolio to manage your resources at scale. After adding a product to a portfolio,
194-
it creates a portfolio-product association, and will become visible from the portfolio side in both the console and service catalog CLI.
195-
A product can be added to multiple portfolios depending on your resource and organizational needs.
195+
You add products to a portfolio to organize and distribute your catalog at scale. Adding a product to a portfolio creates an association,
196+
and the product will become visible within the portfolio side in both the Service Catalog console and AWS CLI.
197+
You can add a product to multiple portfolios depending on your organizational structure and how you would like to group access to products.
196198

197199
```ts fixture=portfolio-product
198200
portfolio.addProduct(product);
199201
```
200202

201203
## Tag Options
202204

203-
TagOptions allow administrators to easily manage tags on provisioned products by creating a selection of tags for end users to choose from.
204-
TagOptions are created by specifying a tag key with a selection of allowed values and can be associated with both portfolios and products.
205+
TagOptions allow administrators to easily manage tags on provisioned products by providing a template for a selection of tags that end users choose from.
206+
TagOptions are created by specifying a tag key with a set of allowed values and can be associated with both portfolios and products.
205207
When launching a product, both the TagOptions associated with the product and the containing portfolio are made available.
206208

207-
At the moment, TagOptions can only be disabled in the console.
209+
At the moment, TagOptions can only be deactivated in the console.
208210

209211
```ts fixture=portfolio-product
210212
const tagOptionsForPortfolio = new servicecatalog.TagOptions(this, 'OrgTagOptions', {
@@ -225,20 +227,19 @@ product.associateTagOptions(tagOptionsForProduct);
225227

226228
## Constraints
227229

228-
Constraints define governance mechanisms that allow you to manage permissions, notifications, and options related to actions end users can perform on products,
229-
Constraints are applied on a portfolio-product association.
230+
Constraints are governance gestures that you place on product-portfolio associations that allow you to manage minimal launch permissions, notifications, and other optional actions that end users can perform on products.
230231
Using the CDK, if you do not explicitly associate a product to a portfolio and add a constraint, it will automatically add an association for you.
231232

232-
There are rules around plurariliites of constraints for a portfolio and product.
233-
For example, you can only have a single "tag update" constraint applied to a portfolio-product association.
233+
There are rules around how constraints are applied to portfolio-product associations.
234+
For example, you can only have a single "launch role" constraint applied to a portfolio-product association.
234235
If a misconfigured constraint is added, `synth` will fail with an error message.
235236

236237
Read more at [Service Catalog Constraints](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints.html).
237238

238239
### Tag update constraint
239240

240241
Tag update constraints allow or disallow end users to update tags on resources associated with an AWS Service Catalog product upon provisioning.
241-
By default, tag updating is not permitted.
242+
By default, if a Tag Update constraint is not configured, tag updating is not permitted.
242243
If tag updating is allowed, then new tags associated with the product or portfolio will be applied to provisioned resources during a provisioned product update.
243244

244245
```ts fixture=portfolio-product
@@ -258,30 +259,30 @@ portfolio.constrainTagUpdates(product, {
258259

259260
### Notify on stack events
260261

261-
Allows users to subscribe an AWS `SNS` topic to the stack events of the product.
262-
When an end user provisions a product it creates a product stack that notifies the subscribed topic on creation, edit, and delete events.
263-
An individual `SNS` topic may only be subscribed once to a portfolio-product association.
262+
Allows users to subscribe an AWS `SNS` topic to a provisioned product's CloudFormation stack events.
263+
When an end user provisions a product it creates a CloudFormation stack that notifies the subscribed topic on creation, edit, and delete events.
264+
An individual `SNS` topic may only have a single subscription to any given portfolio-product association.
264265

265266
```ts fixture=portfolio-product
266267
import * as sns from '@aws-cdk/aws-sns';
267268

268-
const topic1 = new sns.Topic(this, 'MyTopic1');
269+
const topic1 = new sns.Topic(this, 'Topic1');
269270
portfolio.notifyOnStackEvents(product, topic1);
270271

271-
const topic2 = new sns.Topic(this, 'MyTopic2');
272+
const topic2 = new sns.Topic(this, 'Topic2');
272273
portfolio.notifyOnStackEvents(product, topic2, {
273-
description: 'description for this topic2', // description is an optional field.
274+
description: 'description for topic2', // description is an optional field.
274275
});
275276
```
276277

277-
### CloudFormation parameters constraint
278+
### CloudFormation template parameters constraint
278279

279-
CloudFormation parameters constraints allow you to configure the that are available to end users when they launch a product via defined rules.
280-
A rule consists of one or more assertions that narrow the allowable values for parameters in a product.
281-
You can configure multiple parameter constraints to govern the different parameters and parameter options in your products.
282-
For example, a rule might define the various instance types that users can choose from when launching a stack that includes EC2 instances.
283-
A parameter rule has an optional `condition` field that allows ability to configure when rules are applied.
284-
If a `condition` is specified, all the assertions will be applied if the condition evalutates to true.
280+
CloudFormation template parameter constraints allow you to configure the provisioning parameters that are available to end users when they launch a product.
281+
Template constraint rules consist of one or more assertions that define the default and/or allowable values for a product’s provisioning parameters.
282+
You can configure multiple parameter constraints to govern the different provisioning parameters within your products.
283+
For example, a rule might define the `EC2` instance types that users can choose from when launching a product that includes one or more `EC2` instances.
284+
Parameter rules have an optional `condition` field that allow for rule application to consider conditional evaluations.
285+
If a `condition` is specified, all assertions will be applied if the condition evaluates to true.
285286
For information on rule-specific intrinsic functions to define rule conditions and assertions,
286287
see [AWS Rule Functions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html).
287288

@@ -302,10 +303,12 @@ portfolio.constrainCloudFormationParameters(product, {
302303

303304
### Set launch role
304305

305-
Allows you to configure a specific AWS `IAM` role that a user must assume when launching a product.
306-
By setting this launch role, you can control what policies and privileges end users can have.
307-
The launch role must be assumed by the service catalog principal.
308-
You can only have one launch role set for a portfolio-product association, and you cannot set a launch role if a StackSets deployment has been configured.
306+
Allows you to configure a specific `IAM` role that Service Catalog assumes on behalf of the end user when launching a product.
307+
By setting a launch role constraint, you can maintain least permissions for an end user when launching a product.
308+
For example, a launch role can grant permissions for specific resource creation like an `S3` bucket that the user.
309+
The launch role must be assumed by the Service Catalog principal.
310+
You can only have one launch role set for a portfolio-product association,
311+
and you cannot set a launch role on a product that already has a StackSets deployment configured.
309312

310313
```ts fixture=portfolio-product
311314
import * as iam from '@aws-cdk/aws-iam';
@@ -346,16 +349,16 @@ const launchRole: iam.IRole = portfolio.setLocalLaunchRoleName(product, roleName
346349
```
347350

348351
See [Launch Constraint](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-launch.html) documentation
349-
to understand the permissions roles need.
352+
to understand the permissions that launch roles need.
350353

351354
### Deploy with StackSets
352355

353356
A StackSets deployment constraint allows you to configure product deployment options using
354357
[AWS CloudFormation StackSets](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/using-stacksets.html).
355-
You can specify multiple accounts and regions for the product launch following StackSets conventions.
356-
There is an additional field `allowStackSetInstanceOperations` that configures ability for end users to create, edit, or delete the stacks.
358+
You can specify one or more accounts and regions into which stack instances will launch when the product is provisioned.
359+
There is an additional field `allowStackSetInstanceOperations` that sets ability for end users to create, edit, or delete the stacks created by the StackSet.
357360
By default, this field is set to `false`.
358-
End users can manage those accounts and determine where products deploy and the order of deployment.
361+
When launching a StackSets product, end users can select from the list of accounts and regions configured in the constraint to determine where the Stack Instances will deploy and the order of deployment.
359362
You can only define one StackSets deployment configuration per portfolio-product association,
360363
and you cannot both set a launch role and StackSets deployment configuration for an assocation.
361364

packages/@aws-cdk/aws-servicecatalog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"ref-via-interface:@aws-cdk/aws-servicecatalog.PortfolioProps.tagOptions"
122122
]
123123
},
124-
"maturity": "experimental",
124+
"maturity": "developer-preview",
125125
"stability": "experimental",
126126
"awscdkio": {
127127
"announce": false

0 commit comments

Comments
 (0)