generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,533 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bin/ | ||
/node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: confluentcloud-ts-patch | ||
runtime: nodejs | ||
description: A minimal TypeScript Pulumi program |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import * as confluent from "@pulumi/confluentcloud"; | ||
|
||
const env = new confluent.Environment("ts-env"); | ||
|
||
const kfCluster = new confluent.KafkaCluster("kfCluster", { | ||
cloud: "AWS", | ||
region: "us-west-2", | ||
availability: "SINGLE_ZONE", | ||
environment: { | ||
id: env.id, | ||
}, | ||
}); | ||
|
||
const kfTopic = new confluent.KafkaTopic("kfTopic", { | ||
topicName: "test-topic", | ||
kafkaCluster: { | ||
id: kfCluster.id, | ||
}, | ||
// Deprecated field which we are still supporting. | ||
httpEndpoint: kfCluster.restEndpoint, | ||
}); |
1,431 changes: 1,431 additions & 0 deletions
1,431
examples/kafka-topic-patch/ts/step1/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "confluentcloud-ts-environment", | ||
"devDependencies": { | ||
"@types/node": "^14" | ||
}, | ||
"dependencies": { | ||
"@pulumi/pulumi": "^3.73.0", | ||
"@pulumi/random": "^4.0.0" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"outDir": "bin", | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import * as confluent from "@pulumi/confluentcloud"; | ||
|
||
const env = new confluent.Environment("ts-env"); | ||
|
||
const kfCluster = new confluent.KafkaCluster("kfCluster", { | ||
cloud: "AWS", | ||
region: "us-west-2", | ||
availability: "SINGLE_ZONE", | ||
environment: { | ||
id: env.id, | ||
}, | ||
}); | ||
|
||
const kfTopic = new confluent.KafkaTopic("kfTopic", { | ||
topicName: "test-topic", | ||
kafkaCluster: { | ||
id: kfCluster.id, | ||
}, | ||
// Deprecated field which we are still supporting. | ||
httpEndpoint: kfCluster.restEndpoint, | ||
}); | ||
|
||
const res = kfCluster.restEndpoint.apply((endPt) => { | ||
const res = confluent.getKafkaTopic({ | ||
topicName: "test-topic", | ||
restEndpoint: endPt, | ||
}); | ||
|
||
return res; | ||
}); |