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
dimisjim authored Nov 12, 2024
2 parents eb71b95 + f80cc5b commit 49f90fb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
framework: terraform

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

# Push Terraform-docs changes
- uses: planetscale/ghcommit-action@v0.1.45
- uses: planetscale/ghcommit-action@v0.2.0
# 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 All @@ -61,7 +61,7 @@ jobs:
echo '### Please run terraform-docs locally and commit the changes:' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '```sh' >> $GITHUB_STEP_SUMMARY
echo 'docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.17.0 markdown --output-file README.md --output-mode inject /terraform-docs' >> $GITHUB_STEP_SUMMARY
echo 'docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs markdown --output-file README.md --output-mode inject /terraform-docs' >> $GITHUB_STEP_SUMMARY
echo 'git add README.md' >> $GITHUB_STEP_SUMMARY
echo 'git commit --amend --no-edit' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
Expand Down
5 changes: 5 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
settings:
# https://github.com/terraform-docs/gh-actions/issues/98
# Since we do not commit the lockfile, it has no effect in gh workflows.
# Changes local runs to match the gh workflow behavior.
lockfile: false
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Atlantis on Google Compute Engine

![Header](./static/banner.png)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frunatlantis%2Fterraform-gce-atlantis.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Frunatlantis%2Fterraform-gce-atlantis?ref=badge_shield)

This Terraform module deploys various resources to run Atlantis on Google Compute Engine.

Expand Down Expand Up @@ -187,7 +188,7 @@ You can check the status of the certificate in the Google Cloud Console.
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_cloudinit"></a> [cloudinit](#requirement\_cloudinit) | >=2.2.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >=4.79.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >=6.9.0 |
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >=4.79.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >=3.4.3 |

Expand All @@ -196,15 +197,15 @@ You can check the status of the certificate in the Google Cloud Console.
| Name | Version |
|------|---------|
| <a name="provider_cloudinit"></a> [cloudinit](#provider\_cloudinit) | >=2.2.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >=4.79.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >=6.9.0 |
| <a name="provider_google-beta"></a> [google-beta](#provider\_google-beta) | >=4.79.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >=3.4.3 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_container"></a> [container](#module\_container) | terraform-google-modules/container-vm/google | 3.1.1 |
| <a name="module_container"></a> [container](#module\_container) | terraform-google-modules/container-vm/google | ~> 3.2 |

## Resources

Expand Down Expand Up @@ -244,7 +245,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <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 |
| <a name="input_google_monitoring_enabled"></a> [google\_monitoring\_enabled](#input\_google\_monitoring\_enabled) | Enable Google Cloud Monitoring | `bool` | `true` | no |
| <a name="input_iap"></a> [iap](#input\_iap) | Settings for enabling Cloud Identity Aware Proxy to protect the Atlantis UI | <pre>object({<br> oauth2_client_id = string<br> oauth2_client_secret = string<br> })</pre> | `null` | no |
| <a name="input_iap"></a> [iap](#input\_iap) | Settings for enabling Cloud Identity Aware Proxy to protect the Atlantis UI | <pre>object({<br/> oauth2_client_id = string<br/> oauth2_client_secret = string<br/> })</pre> | `null` | no |
| <a name="input_iap_backend_security_policy"></a> [iap\_backend\_security\_policy](#input\_iap\_backend\_security\_policy) | Name of the security policy to apply to the IAP backend service | `string` | `null` | no |
| <a name="input_image"></a> [image](#input\_image) | Docker image. This is most often a reference to a container located in a container registry | `string` | `"ghcr.io/runatlantis/atlantis:latest"` | no |
| <a name="input_labels"></a> [labels](#input\_labels) | Key-value pairs representing labels attaching to instance & instance template | `map(any)` | `{}` | no |
Expand All @@ -256,9 +257,9 @@ You can check the status of the certificate in the Google Cloud Console.
| <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 |
| <a name="input_shared_vpc"></a> [shared\_vpc](#input\_shared\_vpc) | Whether to deploy within a shared VPC | <pre>object({<br> host_project_id = string<br> })</pre> | `null` | no |
| <a name="input_shielded_instance_config"></a> [shielded\_instance\_config](#input\_shielded\_instance\_config) | Shielded VM provides verifiable integrity to prevent against malware and rootkits | <pre>object({<br> enable_integrity_monitoring = optional(bool)<br> enable_vtpm = optional(bool)<br> enable_secure_boot = optional(bool)<br> })</pre> | <pre>{<br> "enable_integrity_monitoring": true,<br> "enable_secure_boot": true,<br> "enable_vtpm": true<br>}</pre> | no |
| <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 |
| <a name="input_shared_vpc"></a> [shared\_vpc](#input\_shared\_vpc) | Whether to deploy within a shared VPC | <pre>object({<br/> host_project_id = string<br/> })</pre> | `null` | no |
| <a name="input_shielded_instance_config"></a> [shielded\_instance\_config](#input\_shielded\_instance\_config) | Shielded VM provides verifiable integrity to prevent against malware and rootkits | <pre>object({<br/> enable_integrity_monitoring = optional(bool)<br/> enable_vtpm = optional(bool)<br/> enable_secure_boot = optional(bool)<br/> })</pre> | <pre>{<br/> "enable_integrity_monitoring": true,<br/> "enable_secure_boot": true,<br/> "enable_vtpm": true<br/>}</pre> | no |
| <a name="input_spot_machine_enabled"></a> [spot\_machine\_enabled](#input\_spot\_machine\_enabled) | A Spot VM is discounted Compute Engine capacity that may be preemptively stopped or deleted by Compute Engine if the capacity is needed | `bool` | `false` | no |
| <a name="input_ssl_policy"></a> [ssl\_policy](#input\_ssl\_policy) | The SSL policy name that the certificate must follow | `string` | `null` | no |
| <a name="input_startup_script"></a> [startup\_script](#input\_startup\_script) | A startup script that runs during the boot cycle when you first launch an instance | `string` | `null` | no |
Expand All @@ -275,4 +276,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="output_ip_address"></a> [ip\_address](#output\_ip\_address) | The IPv4 address of the load balancer |
| <a name="output_managed_ssl_certificate_certificate_id"></a> [managed\_ssl\_certificate\_certificate\_id](#output\_managed\_ssl\_certificate\_certificate\_id) | The unique identifier of the Google Managed SSL certificate |
| <a name="output_managed_ssl_certificate_expire_time"></a> [managed\_ssl\_certificate\_expire\_time](#output\_managed\_ssl\_certificate\_expire\_time) | Expire time of the Google Managed SSL certificate |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frunatlantis%2Fterraform-gce-atlantis.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Frunatlantis%2Fterraform-gce-atlantis?ref=badge_large)
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
locals {

# The default port that Atlantis runs on is 4141, we default to this.
atlantis_port = lookup(var.env_vars, "ATLANTIS_PORT", 4141)
# Atlantis' home directory is "/home/atlantis", we default to this.
Expand Down Expand Up @@ -79,7 +80,7 @@ data "cloudinit_config" "config" {

module "container" {
source = "terraform-google-modules/container-vm/google"
version = "3.1.1"
version = "~> 3.2"

cos_image_name = var.machine_image != null ? element(split("/", var.machine_image), length(split("/", var.machine_image)) - 1) : null

Expand Down Expand Up @@ -346,6 +347,7 @@ resource "google_compute_backend_service" "iap" {
}

iap {
enabled = true
oauth2_client_id = var.iap.oauth2_client_id
oauth2_client_secret = var.iap.oauth2_client_secret
}
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">=4.79.0"
version = ">=6.9.0"
}
google-beta = {
source = "hashicorp/google-beta"
Expand Down

0 comments on commit 49f90fb

Please sign in to comment.