Fix E2E tests.

* Disable tests for VPC connector and Cloud Functions, CFs are not
  supporrted in the default region
* fix permissions to secrets for Cloud Run
* add permissions admin permissions to any SA within project to
  `var.bucket`
* add permissions to access the secret to any SA within project to
  secrets created by fixture
* disable custom roles in E2E tests, as `var.organization_id` is not the
  same org, within which projects are created in E2E
This commit is contained in:
Wiktor Niesiobędzki
2025-11-03 14:27:02 +00:00
parent 64632eb957
commit d5bc59a238
9 changed files with 22 additions and 25 deletions

View File

@@ -414,7 +414,7 @@ module "cf_http" {
egress_setting = "ALL_TRAFFIC"
}
}
# tftest fixtures=fixtures/vpc-connector.tf inventory=service-vpc-access-connector.yaml e2e
# tftest fixtures=fixtures/vpc-connector.tf inventory=service-vpc-access-connector.yaml
```
If creation of the VPC Access Connector is required, use the `vpc_connector.create` and `vpc_connector_create` variable which also supports optional attributes like number of instances, machine type, or throughput.
@@ -441,7 +441,7 @@ module "cf_http" {
}
}
}
# tftest inventory=service-vpc-access-connector-create.yaml e2e
# tftest inventory=service-vpc-access-connector-create.yaml
```
Note that if you are using a Shared VPC for the connector, you need to specify a subnet and the host project if this is not where the Cloud Run service is deployed.
@@ -471,7 +471,7 @@ module "cf_http" {
}
}
}
# tftest fixtures=fixtures/shared-vpc.tf inventory=service-vpc-access-connector-create-sharedvpc.yaml e2e
# tftest fixtures=fixtures/shared-vpc.tf inventory=service-vpc-access-connector-create-sharedvpc.yaml
```
<!-- BEGIN TFDOC -->
## Variables