This module creates AppHub related resources. This includes,
- Creation of an AppHub application in host project
- Creation of service attachment between host project and service project
- Registration of services with application
- Registration of workloads with application
- All required APIs are enabled in the GCP Project. The AppHub api is enabled in host project
Basic usage of this module is as follows:
module "apphub" {
source = "terraform-google-modules/apphub/google"
version = "~> 0.3"
project_id = "<PROJECT ID>"
application_id = "<APPHUB_APPLICATION_ID>"
location = "<LOCATION>"
scope = { type: "REGIONAL"}
create_application = true // Create new apphub application
}
Functional examples are included in the examples directory.
Name | Description | Type | Default | Required |
---|---|---|---|---|
application_id | The AppHub application identifier | string |
n/a | yes |
attributes | Attributes for the AppHub application | object({ |
null |
no |
create_application | Create apphub application when true | bool |
false |
no |
description | User-defined description of AppHub application | string |
"" |
no |
display_name | User-defined name for the AppHub application | string |
"" |
no |
location | The location of AppHub application. | string |
n/a | yes |
project_id | The project ID of the host project where AppHub application is created. | string |
n/a | yes |
scope | Scope of the AppHub application. Possible values are: REGIONAL, GLOBAL. | object({ type : string }) |
{ |
no |
service_project_ids | The list of service projects to attach with host project. | list(string) |
[] |
no |
service_uris | The list of service uris in CAIS style to register | list(object({ service_uri : string, service_id : string, location : string })) |
[] |
no |
workload_uris | The list of workload uris in CAIS style to register | list(object({ workload_uri : string, workload_id : string, location : string })) |
[] |
no |
Name | Description |
---|---|
application_id | The apphub application id in format projects/{{project}}/locations/{{location}}/applications/{{application_id}} |
service_ids | The list of service ids registered with application. |
workload_ids | The list of workload ids registered with application. |
These sections describe requirements for using this module.
The following dependencies must be available:
- [Terraform][terraform] v0.13
- [Terraform Provider for GCP][terraform-provider-gcp] plugin v3.0
A service account with the following roles must be used to provision the resources of this module:
- App Hub Admin:
roles/apphub.admin
The [Project Factory module][project-factory-module] and the [IAM module][iam-module] may be used in combination to provision a service account with the necessary roles applied.
A project with the following APIs enabled must be used as host project for this module:
- Google AppHub API:
apphub.googleapis.com
The [Project Factory module][project-factory-module] can be used to provision a project with the necessary APIs enabled.
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.