projen-cdktf-hybrid-construct 0.1.48 → 0.1.51
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.
- package/README.md +75 -3
- package/package.json +1 -1
package/README.md
CHANGED
@@ -93,6 +93,80 @@ const project = new TerraformModule({
|
|
93
93
|
project.synth();
|
94
94
|
```
|
95
95
|
|
96
|
+
## Publishing
|
97
|
+
|
98
|
+
### Open Source
|
99
|
+
|
100
|
+
#### Terraform
|
101
|
+
|
102
|
+
1. [Sign in at the registry](https://registry.terraform.io/sign-in)
|
103
|
+
2. [Select your repository](https://registry.terraform.io/github/create) and create the module
|
104
|
+
|
105
|
+
Please make sure your repository name starts with `terraform-cdk-`.
|
106
|
+
|
107
|
+
#### npm (Typescript)
|
108
|
+
|
109
|
+
1. Create an account at [npmjs.com](https://npmjs.com/)
|
110
|
+
2. Create an [automation token](https://docs.npmjs.com/creating-and-viewing-access-tokens) on npm
|
111
|
+
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
|
112
|
+
|
113
|
+
#### pypi (Python)
|
114
|
+
|
115
|
+
1. Create an account at [pypi.org](https://pypi.org/)
|
116
|
+
2. Create an [API token](https://pypi.org/help/#apitoken) on pypi
|
117
|
+
3. Set the `publishToPypi` section in the options of `HybridModule` or `TerraformModule`
|
118
|
+
|
119
|
+
```js
|
120
|
+
const name = "name-of-my-hybrid-construct";
|
121
|
+
new HybridModule({
|
122
|
+
name,
|
123
|
+
// ... other options
|
124
|
+
publishToPypi: {
|
125
|
+
distName: name,
|
126
|
+
module: name.replace(/-/g, "_"),
|
127
|
+
},
|
128
|
+
});
|
129
|
+
```
|
130
|
+
|
131
|
+
#### Maven (Java)
|
132
|
+
|
133
|
+
1. [Create a Sonatype account and repository](https://central.sonatype.org/publish/publish-guide/#introduction)
|
134
|
+
2. Setup the `publishToMaven` section in the options of `HybridModule` or `TerraformModule`
|
135
|
+
|
136
|
+
```js
|
137
|
+
const githubNamespace = "my-org";
|
138
|
+
const name = "name-of-my-hybrid-construct";
|
139
|
+
new HybridModule({
|
140
|
+
name,
|
141
|
+
// ... other options
|
142
|
+
publishToMaven: {
|
143
|
+
javaPackage: name.replace(/-/g, "_"),
|
144
|
+
mavenGroupId: `com.${githubNamespace}`,
|
145
|
+
mavenArtifactId: name,
|
146
|
+
},
|
147
|
+
});
|
148
|
+
```
|
149
|
+
|
150
|
+
#### NuGet (C#)
|
151
|
+
|
152
|
+
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)
|
153
|
+
2. [Create API keys](https://docs.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-api-keys)
|
154
|
+
3. Setup the `publishToNuget` section in the options of `HybridModule` or `TerraformModule`
|
155
|
+
|
156
|
+
```js
|
157
|
+
const githubNamespace = "my-org";
|
158
|
+
const name = "name-of-my-hybrid-construct";
|
159
|
+
|
160
|
+
new HybridModule({
|
161
|
+
name,
|
162
|
+
// ... other options
|
163
|
+
publishToNuget: {
|
164
|
+
dotNetNamespace: `MyOrg.NameOfMyHybridConstruct`,
|
165
|
+
packageId: `MyOrg.NameOfMyHybridConstruct`,
|
166
|
+
},
|
167
|
+
});
|
168
|
+
```
|
169
|
+
|
96
170
|
### Roadmap
|
97
171
|
|
98
172
|
- [x] Add dedicated file for HCL templates
|
@@ -101,8 +175,6 @@ project.synth();
|
|
101
175
|
- [x] [Auto-generate parts of the docs](https://github.com/terraform-aws-modules/terraform-aws-eks/blob/e90c877a741ab3cc4215376a70f7bcc360b6a3d2/.github/workflows/pre-commit.yml)
|
102
176
|
- [x] Add example folder to project using this
|
103
177
|
- [x] Add testing strategy
|
178
|
+
- [x] Add construct / option / docs to publish existing module as construct
|
104
179
|
- [ ] Add deployment scripts to Artifactory
|
105
180
|
- [ ] 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?
|