Skip to content

Commit c909f72

Browse files
authored
fix(CI): fix anthos-bm-gcp-terraform (Golang) unit tests (#697)
1 parent 11a9918 commit c909f72

16 files changed

+47
-139
lines changed

.github/workflows/ci_any_pr.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
- uses: actions/checkout@v3
8787
with:
8888
ref: ${{github.event.pull_request.head.sha}}
89+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
90+
with:
91+
go-version-file: ${{ matrix.go-test-dir }}/../go.mod
8992
- name: Golang unit tests
9093
timeout-minutes: 20
9194
env:

.github/workflows/ci_main_branch.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
- uses: actions/checkout@v3
8787
with:
8888
ref: ${{github.event.pull_request.head.sha}}
89+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
90+
with:
91+
go-version-file: ${{ matrix.go-test-dir }}/../go.mod
8992
- name: Golang unit tests
9093
timeout-minutes: 20
9194
env:

anthos-bm-apigee/docs/quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
username = tfadmin
3030
```
3131

32-
Uncomment the `gce_vm_service_account` if you want to login to your cluster
32+
Uncomment the `gcp_login_accounts` if you want to login to your cluster
3333
using the Google email account that is associated with your GCP Project. You
3434
can add multiple GCP accounts to enable access to multiple users.
3535

anthos-bm-apigee/docs/variables.md

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ terraform-docs markdown table \
3737
| Name | Description | Type | Default | Required |
3838
|------|-------------|------|---------|:--------:|
3939
| <a name="input_credentials_file"></a> [credentials\_file](#input\_credentials\_file) | Path to the Google Cloud Service Account key file.<br> This is the key that will be used to authenticate the provider with the Cloud APIs | `string` | n/a | yes |
40-
| <a name="input_gce_vm_service_account"></a> [gce\_vm\_service\_account](#input\_gce\_vm\_service\_account) | Service Account to use for GCE instances | `string` | `""` | no |
4140
| <a name="input_gcp_login_accounts"></a> [gcp\_login\_accounts](#input\_gcp\_login\_accounts) | GCP account email addresses that must be allowed to login to the cluster using Google Cloud Identity. | `list(string)` | `[]` | no |
4241
| <a name="input_mode"></a> [mode](#input\_mode) | Indication of the execution mode. By default the terraform execution will end<br> after setting up the GCE VMs where the Anthos bare metal clusters can be deployed.<br><br> **setup:** create and initialize the GCE VMs required to install Anthos bare metal.<br><br> **install:** everything up to 'setup' mode plus automatically run Anthos bare metal installation steps as well.<br><br> **manuallb:** similar to 'install' mode but Anthos on bare metal is installed with ManualLB mode. | `string` | `"setup"` | no |
4342
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Unique identifer of the Google Cloud Project that is to be used | `string` | n/a | yes |

anthos-bm-gcp-terraform/docs/variables.md

-2
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ terraform-docs markdown table \
6666
| Name | Description | Type | Default | Required |
6767
|------|-------------|------|---------|:--------:|
6868
| <a name="input_abm_cluster_id"></a> [abm\_cluster\_id](#input\_abm\_cluster\_id) | Unique id to represent the Anthos Cluster to be created | `string` | `"cluster1"` | no |
69-
| <a name="input_access_scopes"></a> [access\_scopes](#input\_access\_scopes) | The IAM access scopes associated to the Compute Engine VM Service Accounts | `set(string)` | <pre>[<br> "cloud-platform"<br>]</pre> | no |
7069
| <a name="input_anthos_service_account_name"></a> [anthos\_service\_account\_name](#input\_anthos\_service\_account\_name) | Name given to the Service account that will be used by the Anthos cluster components | `string` | `"baremetal-gcr"` | no |
7170
| <a name="input_boot_disk_size"></a> [boot\_disk\_size](#input\_boot\_disk\_size) | Size of the primary boot disk to be attached to the Compute Engine VMs in GBs | `number` | `200` | no |
7271
| <a name="input_boot_disk_type"></a> [boot\_disk\_type](#input\_boot\_disk\_type) | Type of the boot disk to be attached to the Compute Engine VMs | `string` | `"pd-ssd"` | no |
7372
| <a name="input_connect_agent_account"></a> [connect\_agent\_account](#input\_connect\_agent\_account) | GCP account email address to use with Connect Agent for logging into the cluster using Google Cloud identity. | `string` | `""` | no |
7473
| <a name="input_credentials_file"></a> [credentials\_file](#input\_credentials\_file) | Path to the Google Cloud Service Account key file.<br> This is the key that will be used to authenticate the provider with the Cloud APIs | `string` | n/a | yes |
7574
| <a name="input_enable_nested_virtualization"></a> [enable\_nested\_virtualization](#input\_enable\_nested\_virtualization) | Enable nested virtualization on the Compute Engine VMs are to be scheduled | `string` | `"true"` | no |
76-
| <a name="input_gce_vm_service_account"></a> [gce\_vm\_service\_account](#input\_gce\_vm\_service\_account) | Service Account to use for GCE instances | `string` | `""` | no |
7775
| <a name="input_gpu"></a> [gpu](#input\_gpu) | GPU information to be attached to the provisioned GCE instances.<br> See https://cloud.google.com/compute/docs/gpus for supported types | `object({ type = string, count = number })` | <pre>{<br> "count": 0,<br> "type": ""<br>}</pre> | no |
7876
| <a name="input_image"></a> [image](#input\_image) | The source image to use when provisioning the Compute Engine VMs.<br> Use 'gcloud compute images list' to find a list of all available images | `string` | `"ubuntu-2004-focal-v20210429"` | no |
7977
| <a name="input_image_family"></a> [image\_family](#input\_image\_family) | Source image to use when provisioning the Compute Engine VMs.<br> The source image should be one that is in the selected image\_project | `string` | `"ubuntu-2004-lts"` | no |

anthos-bm-gcp-terraform/terraform.tfvars.sample

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ instance_count = {
1111
"worker" : 2
1212
}
1313
#gcp_login_accounts = ["<GCP_ACCOUNT_1>", <GCP_ACCOUNT_2>, <GCP_ACCOUNT_3>]
14-
#gce_vm_service_account = "<GCE_SERVICE_ACCOUNT_WITH_iam.serviceAccountKeyAdmin_PERMISSION>"
1514
#nfs_server = true
1615
#gpu = {
1716
# count = 1,

anthos-bm-gcp-terraform/test/go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ require (
4141
github.com/gogo/protobuf v1.3.2 // indirect
4242
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4343
github.com/golang/protobuf v1.5.3 // indirect
44-
github.com/google/gnostic v0.5.7-v3refs // indirect
4544
github.com/google/gnostic-models v0.6.8 // indirect
4645
github.com/google/go-cmp v0.5.9 // indirect
4746
github.com/google/go-containerregistry v0.6.0 // indirect

0 commit comments

Comments
 (0)