Skip to content

Conversation

@sander-1105
Copy link
Contributor

Create Terraform files to automate the deployment of Azure resources including virtual networks, Kubernetes clusters, a container registry, and PostgreSQL servers. Define variables, outputs, and modules for resource management across network, Kubernetes, and registry configurations. Set up provider specifications and implement a main configuration to orchestrate these resources. Add .trivyignore and update .pre-commit-config.yaml to include Azure project settings and ignore specific security checks. Add README to document project setup and usage instructions. Add .idea and .github directories to .gitignore.

Create Terraform files to automate the deployment of Azure resources including virtual networks, Kubernetes clusters, a container registry, and PostgreSQL servers. Define variables, outputs, and modules for resource management across network, Kubernetes, and registry configurations. Set up provider specifications and implement a main configuration to orchestrate these resources. Add .trivyignore and update .pre-commit-config.yaml to include Azure project settings and ignore specific security checks. Add README to document project setup and usage instructions. Add .idea and .github directories to .gitignore.
…for Azure

- Add `.terraform.lock.hcl` for Azure environment to ensure consistent provider versions.
- Update provider versions in `config` and `cluster` to use the latest compatible versions.
- Modify `README.md` files to reflect provider version updates.
- Add new NixOS `nixpkgs` reference to `devbox.lock` for development environment stability.
@sander-1105 sander-1105 changed the title feat: Add Azure infrastructure with Terraform Add Azure infrastructure with Terraform Jun 4, 2025
Copy link
Member

@baixiac baixiac left a comment

Choose a reason for hiding this comment

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

The new PR looks good. Added minor comments/questions.

.gitignore Outdated
misc/experimental
.DS_Store
.idea
.github
Copy link
Member

Choose a reason for hiding this comment

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

The .github is still needed for running GH actions so pls keep it version controlled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I recovered it.

args:
- --args=--quiet
- --args=--download-external-modules False
- --args=--skip-check=CKV_TF_1,CKV_AZURE_165,CKV_AZURE_139,CKV_AZURE_166,CKV_AZURE_167,CKV_AZURE_233,CKV_AZURE_237,CKV_AZURE_164,CKV_AZURE_137,CKV2_AZURE_31
Copy link
Member

Choose a reason for hiding this comment

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

Would be nicer to have inline #checkov:skips coz you can document why those rules were skipped, right next to where the Azure resources were defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

processed

.trivyignore Outdated
Comment on lines 2 to 3
AVD-AZU-0040
AVD-AZU-0039
Copy link
Member

Choose a reason for hiding this comment

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

Could you add brief comments on why these rules were ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

processed

Comment on lines 61 to 64
#checkov:skip=CKV_AZURE_170,CKV_AZURE_141,CKV_AZURE_115,CKV_AZURE_117,CKV_AZURE_232,CKV_AZURE_226: ignore check
#checkov:skip=CKV_AZURE_116,CKV_AZURE_6,CKV_AZURE_171,CKV_AZURE_168,CKV_AZURE_4,CKV_AZURE_227: ignore check
#checkov:skip=CKV_TF_1,CKV_AZURE_237,CKV_AZURE_233,CKV_AZURE_167,CKV_AZURE_137,CKV_AZURE_164: ignore check
#checkov:skip=CKV_AZURE_165,CKV_AZURE_166,CKV_AZURE_139: ignore check
Copy link
Member

Choose a reason for hiding this comment

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

As aforementioned, would be nice to add more concrete messages describing why it is ok to ignore them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

processed

Comment on lines 12 to 20
resource "azurerm_container_registry" "main" {
name = "${replace(var.project, "-", "")}${var.environment}acr"
resource_group_name = var.resource_group_name
location = var.location
sku = var.sku
admin_enabled = var.admin_enabled

tags = var.tags
}
Copy link
Member

Choose a reason for hiding this comment

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

If pull-through cache is not used, will a document/script be added to guide users through the process of syncing radar-base images between ACR and DockerHub?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Users can decide which Radar-base images need to be synchronized according to their own needs. I will write a document explaining how to synchronize Radar-base images.

Copy link
Member

@baixiac baixiac left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding documentation on the usage, very helpful.

resolved conflicts
resolved conflicts
@sander-1105 sander-1105 requested a review from baixiac June 9, 2025 02:09
@baixiac baixiac merged commit de3f7f1 into RADAR-base:main Jun 9, 2025
1 check passed
@sander-1105 sander-1105 deleted the feature/azure branch June 9, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants