Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Use schema information to elide autonames #79

Merged
merged 1 commit into from Mar 1, 2019
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Mar 1, 2019

If --filter-auto-names is specified on the command line, filter
values for properties that are marked as autogenerated names from
the generated code.

@pgavlin
Copy link
Member Author

pgavlin commented Mar 1, 2019

The diff I posted earlier was not accurate due to a friendly bug I left in pulumi-terraform. Here's an example of an actual diff:

diff --git a/sdk/nodejs/athena/database.ts b/sdk/nodejs/athena/database.ts
index f91c5d2..8933c9e 100644
--- a/sdk/nodejs/athena/database.ts
+++ b/sdk/nodejs/athena/database.ts
@@ -13,11 +13,10 @@ import * as utilities from "../utilities";
  * import * as pulumi from "@pulumi/pulumi";
  * import * as aws from "@pulumi/aws";
  *
- * const hogeBucket = new aws.s3.Bucket("hoge", {
- *     bucket: "hoge",
- * });
+ * const hogeBucket = new aws.s3.Bucket("hoge", {});
  * const hogeDatabase = new aws.athena.Database("hoge", {
  *     bucket: hogeBucket.bucket,
+ *     name: "database_name",
  * });
  * ```
  */

This diff features both a previously-undetected auto-name property being elided and a previously-erroneously-elided property being restored.

If `--filter-auto-names` is specified on the command line, filter
values for properties that are marked as autogenerated names from
the generated code.
Copy link
Contributor

@swgillespie swgillespie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pgavlin pgavlin merged commit 03e5e42 into master Mar 1, 2019
@pulumi-bot pulumi-bot deleted the pgavlin/elideAutoNames branch March 1, 2019 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants