-
Notifications
You must be signed in to change notification settings - Fork 1
Add bootstrapper configurations #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add bootstrapper configurations #864
Conversation
🦋 Changeset detectedLatest commit: 90fe018 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (47.85%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #864 +/- ##
===========================================
- Coverage 67.85% 47.85% -20.01%
===========================================
Files 31 39 +8
Lines 840 1469 +629
Branches 146 184 +38
===========================================
+ Hits 570 703 +133
- Misses 258 752 +494
- Partials 12 14 +2
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances the infrastructure scaffolding process by introducing clearer separation between repository-level and environment-specific Terraform files. It adds support for scaffolding a default production environment with its own provider configuration template.
Key changes:
- Adds a new Terraform provider template for the production environment
- Refactors the Terraform file generation to separate repository and environment concerns
- Introduces new functions to handle environment-specific file scaffolding
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/monorepo-generator/templates/monorepo/infra/resources/prod/providers.tf.hbs | Adds new Terraform provider template for production environment |
packages/monorepo-generator/src/index.ts | Refactors Terraform file generation functions and adds environment-specific scaffolding |
.changeset/weak-bears-crash.md | Documents the addition of default prod environment to the template |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/monorepo-generator/templates/monorepo/infra/resources/prod/providers.tf.hbs
Outdated
Show resolved
Hide resolved
b6c732c
to
b1d5765
Compare
871c3a3
to
576a6b8
Compare
f111c61
to
7b03d33
Compare
f60f4dc
to
74d2054
Compare
🎉 All dependencies have been resolved ! |
7b03d33
to
d0386d0
Compare
� Conflicts: � packages/monorepo-generator/package.json � pnpm-lock.yaml
# Conflicts: # packages/monorepo-generator/src/adapters/octokit/index.ts
� Conflicts: � apps/cli/package.json � packages/monorepo-generator/package.json � pnpm-lock.yaml � pnpm-workspace.yaml
# Conflicts: # packages/monorepo-generator/src/adapters/octokit/index.ts
|
||
core_state = { | ||
bucket = "{{ awsAccountId }}-terraform-state" | ||
key = "{{ repoName }}.repository.tfstate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: key contains repository
. it should not here since we are in the bootstrapper
location = "{{ azureLocation }}" | ||
location_short = "{{ locationShort }}" | ||
domain = "{{ domain }}" | ||
app_name = "{{ awsAppName }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: do we really need the app_name
? why the parameter is called awsAppName
then? here we are in the azure
template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the underlying module variables, the app_name
can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the location_short
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
packages/monorepo-generator/templates/monorepo/infra/bootstrapper/azure/main.tf.hbs
Outdated
Show resolved
Hide resolved
packages/monorepo-generator/templates/monorepo/infra/bootstrapper/azure/main.tf.hbs
Show resolved
Hide resolved
packages/monorepo-generator/templates/monorepo/infra/bootstrapper/aws/providers.tf.hbs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
resource_group_name = "{{ tfStateResourceGroupName }}" | ||
storage_account_name = "{{ tfStateStorageAccountName }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: those parameters are not coded into this PR, but we are going to inherit them from #911 🚓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
To verify the generated code:
Please note that the cc @pagopa/engineering-team-devex |
This pull request enhances the infrastructure scaffolding process in the monorepo generator by improving how Terraform files are organized and generated. The changes introduce a clearer separation of repository-level and environment-specific Terraform files, and add a new default provider configuration template for production environments.
Depends on #863 #884 #911
Closes CES-1260