Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
d-costa authored Aug 6, 2024
2 parents 2660466 + 0adfb43 commit 0d5ca34
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
with:
directory: .
quiet: true
skip_check: CKV_TF_1,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
skip_check: CKV_TF_1,CKV_TF_2,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
framework: terraform

# Terraform-docs
- uses: terraform-docs/gh-actions@v1.1.0
- uses: terraform-docs/gh-actions@v1.2.0
id: terraform-docs
with:
working-dir: .
Expand All @@ -43,7 +43,7 @@ jobs:
git-push: 'false'

# Push Terraform-docs changes
- uses: planetscale/[email protected].38
- uses: planetscale/[email protected].44
# Run this step even if previous steps fails (there are changes to commit)
# but skip when on forks
if: ${{ !cancelled() && github.repository_owner == 'runatlantis' }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="input_enable_confidential_vm"></a> [enable\_confidential\_vm](#input\_enable\_confidential\_vm) | Enable Confidential VM. If true, on host maintenance will be set to TERMINATE | `bool` | `false` | no |
| <a name="input_enable_oslogin"></a> [enable\_oslogin](#input\_enable\_oslogin) | Enables OS Login service on the VM | `bool` | `false` | no |
| <a name="input_env_vars"></a> [env\_vars](#input\_env\_vars) | Key-value pairs representing environment variables and their respective values | `map(any)` | n/a | yes |
| <a name="input_expose_healthz_publicly"></a> [expose\_healthz\_publicly](#input\_expose\_healthz\_publicly) | Exposes the /healthz endpoint publicly even if Atlantis is protected by IAP | `bool` | `false` | no |
| <a name="input_expose_metrics_publicly"></a> [expose\_metrics\_publicly](#input\_expose\_metrics\_publicly) | Exposes the /metrics endpoint publicly even if Atlantis is protected by IAP | `bool` | `false` | no |
| <a name="input_google_logging_enabled"></a> [google\_logging\_enabled](#input\_google\_logging\_enabled) | Enable Google Cloud Logging | `bool` | `true` | no |
| <a name="input_google_logging_use_fluentbit"></a> [google\_logging\_use\_fluentbit](#input\_google\_logging\_use\_fluentbit) | Enable Google Cloud Logging using Fluent Bit | `bool` | `false` | no |
Expand All @@ -252,6 +253,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="input_name"></a> [name](#input\_name) | Custom name that's used during resource creation | `string` | n/a | yes |
| <a name="input_network"></a> [network](#input\_network) | Name of the network | `string` | n/a | yes |
| <a name="input_persistent_disk_size_gb"></a> [persistent\_disk\_size\_gb](#input\_persistent\_disk\_size\_gb) | The size of the persistent disk that Atlantis uses to store its data on | `number` | `50` | no |
| <a name="input_persistent_disk_type"></a> [persistent\_disk\_type](#input\_persistent\_disk\_type) | The type of persistent disk that Atlantis uses to store its data on | `string` | `"pd-ssd"` | no |
| <a name="input_project"></a> [project](#input\_project) | The ID of the project in which the resource belongs | `string` | `null` | no |
| <a name="input_region"></a> [region](#input\_region) | The region that resources should be created in | `string` | n/a | yes |
| <a name="input_service_account"></a> [service\_account](#input\_service\_account) | Service account to attach to the instance running Atlantis | <pre>object({<br> email = string,<br> scopes = list(string)<br> })</pre> | <pre>{<br> "email": "",<br> "scopes": [<br> "cloud-platform"<br> ]<br>}</pre> | no |
Expand Down
10 changes: 9 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ resource "google_compute_instance_template" "default" {
# Persistent disk for Atlantis
disk {
device_name = "atlantis-disk-0"
disk_type = "pd-ssd"
disk_type = var.persistent_disk_type
mode = "READ_WRITE"
disk_size_gb = var.persistent_disk_size_gb
auto_delete = false
Expand Down Expand Up @@ -407,6 +407,14 @@ resource "google_compute_url_map" "default" {
service = google_compute_backend_service.default.id
}
}

dynamic "path_rule" {
for_each = var.expose_healthz_publicly ? [1] : []
content {
paths = ["/healthz"]
service = google_compute_backend_service.default.id
}
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ variable "expose_metrics_publicly" {
default = false
}

variable "expose_healthz_publicly" {
type = bool
description = "Exposes the /healthz endpoint publicly even if Atlantis is protected by IAP"
default = false
}

variable "google_logging_enabled" {
type = bool
description = "Enable Google Cloud Logging"
Expand Down Expand Up @@ -195,3 +201,9 @@ variable "shared_vpc" {
})
default = null
}

variable "persistent_disk_type" {
type = string
description = "The type of persistent disk that Atlantis uses to store its data on"
default = "pd-ssd"
}

0 comments on commit 0d5ca34

Please sign in to comment.