projen-cdktf-hybrid-construct 0.1.49 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +77 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -67,7 +67,7 @@ project.synth();
67
67
 
68
68
  If you want to republish an existing Terraform module as a CDKTF construct or if you want to repackage them with an easier to use API you can use the `TerraformModule` template.
69
69
 
70
- ```js
70
+ ````js
71
71
  const { HybridModule } = require("projen-cdktf-hybrid-construct");
72
72
 
73
73
  const project = new TerraformModule({
@@ -91,6 +91,81 @@ const project = new TerraformModule({
91
91
  });
92
92
 
93
93
  project.synth();
94
+
95
+
96
+
97
+ ## Publishing
98
+
99
+ ### Open Source
100
+
101
+ #### Terraform
102
+
103
+ 1. [Sign in at the registry](https://registry.terraform.io/sign-in)
104
+ 2. [Select your repository](https://registry.terraform.io/github/create) and create the module
105
+
106
+ Please make sure your repository name starts with `terraform-cdk-`.
107
+
108
+ #### npm (Typescript)
109
+
110
+ 1. Create an account at [npmjs.com](https://npmjs.com/)
111
+ 2. Create an [automation token](https://docs.npmjs.com/creating-and-viewing-access-tokens) on npm
112
+ 3. Create a [GitHub Action Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) with the name `NPM_TOKEN` and the value of the token
113
+
114
+ #### pypi (Python)
115
+
116
+ 1. Create an account at [pypi.org](https://pypi.org/)
117
+ 2. Create an [API token](https://pypi.org/help/#apitoken) on pypi
118
+ 3. Set the `publishToPypi` section in the options of `HybridModule` or `TerraformModule`
119
+
120
+ ```js
121
+ const name = "name-of-my-hybrid-construct";
122
+ new HybridModule({
123
+ name,
124
+ // ... other options
125
+ publishToPypi: {
126
+ distName: name,
127
+ module: name.replace(/-/g, "_"),
128
+ },
129
+ });
130
+ ````
131
+
132
+ #### Maven (Java)
133
+
134
+ 1. [Create a Sonatype account and repository](https://central.sonatype.org/publish/publish-guide/#introduction)
135
+ 2. Setup the `publishToMaven` section in the options of `HybridModule` or `TerraformModule`
136
+
137
+ ```js
138
+ const githubNamespace = "my-org";
139
+ const name = "name-of-my-hybrid-construct";
140
+ new HybridModule({
141
+ name,
142
+ // ... other options
143
+ publishToMaven: {
144
+ javaPackage: name.replace(/-/g, "_"),
145
+ mavenGroupId: `com.${githubNamespace}`,
146
+ mavenArtifactId: name,
147
+ },
148
+ });
149
+ ```
150
+
151
+ #### NuGet (C#)
152
+
153
+ 1. [Create a NuGet account](https://www.nuget.org/users/account/LogOn) (you might need to create a Microsoft Account if you don't have one)
154
+ 2. [Create API keys](https://docs.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-api-keys)
155
+ 3. Setup the `publishToNuget` section in the options of `HybridModule` or `TerraformModule`
156
+
157
+ ```js
158
+ const githubNamespace = "my-org";
159
+ const name = "name-of-my-hybrid-construct";
160
+
161
+ new HybridModule({
162
+ name,
163
+ // ... other options
164
+ publishToNuget: {
165
+ dotNetNamespace: `MyOrg.NameOfMyHybridConstruct`,
166
+ packageId: `MyOrg.NameOfMyHybridConstruct`,
167
+ },
168
+ });
94
169
  ```
95
170
 
96
171
  ### Roadmap
@@ -101,8 +176,6 @@ project.synth();
101
176
  - [x] [Auto-generate parts of the docs](https://github.com/terraform-aws-modules/terraform-aws-eks/blob/e90c877a741ab3cc4215376a70f7bcc360b6a3d2/.github/workflows/pre-commit.yml)
102
177
  - [x] Add example folder to project using this
103
178
  - [x] Add testing strategy
179
+ - [x] Add construct / option / docs to publish existing module as construct
104
180
  - [ ] Add deployment scripts to Artifactory
105
181
  - [ ] Add deployment scripts to Github Packages
106
- - [x] Add construct / option / docs to publish existing module as construct
107
- - [ ] Add construct for managing multiple repos like this
108
- - [ ] Add option to manager projen template to bootstrap cdktf app that deploys Artifactory?
package/package.json CHANGED
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "main": "lib/index.js",
61
61
  "license": "MIT",
62
- "version": "0.1.49",
62
+ "version": "0.1.50",
63
63
  "jest": {
64
64
  "testMatch": [
65
65
  "<rootDir>/src/**/__tests__/**/*.ts?(x)",