-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds support for the Dataproc on GDC Service Instance resourc…
…e to the provider. **Release Note Template for Downstream PRs (will be copied)** ```release-note:new-resource `google_dataproc_gdc_service_instance`
- Loading branch information
Jerry Ding
committed
Oct 22, 2024
1 parent
9dc28c8
commit b3af720
Showing
6 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
base_url: projects/{{project}}/locations/{{location}}/serviceInstances | ||
create_url: projects/{{project}}/locations/{{location}}/serviceInstances?serviceInstanceId={{service_instance_id}} | ||
self_link: projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} | ||
id_format: projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} | ||
import_format: | ||
- projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} | ||
name: ServiceInstance | ||
description: A service instance is an instance of the Dataproc operator running on a GDC cluster. | ||
autogen_async: true | ||
properties: | ||
- name: gdceCluster | ||
type: NestedObject | ||
properties: | ||
- name: gdceCluster | ||
type: String | ||
description: 'Required. Gdce cluster resource id. ' | ||
required: true | ||
description: 'Gdce cluster information. ' | ||
- name: name | ||
type: String | ||
description: 'Identifier. The name of the service instance. ' | ||
output: true | ||
- name: uid | ||
type: String | ||
description: "Output only. System generated unique identifier for this service instance, | ||
formatted as\nUUID4. " | ||
output: true | ||
- name: displayName | ||
type: String | ||
description: 'Optional. User-provided human-readable name to be used in user interfaces. ' | ||
- name: createTime | ||
type: String | ||
description: 'Output only. The timestamp when the resource was created. ' | ||
output: true | ||
- name: updateTime | ||
type: String | ||
description: 'Output only. The timestamp when the resource was most recently updated. ' | ||
output: true | ||
- name: requestedState | ||
type: String | ||
description: "Output only. The intended state to which the service instance is reconciling. | ||
\n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDISCONNECTED\nDELETING\nSTOPPING\nSTOPPED\nSTARTING\nUPDATING\nFAILED" | ||
output: true | ||
- name: state | ||
type: String | ||
description: "Output only. The current state. \n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDISCONNECTED\nDELETING\nSTOPPING\nSTOPPED\nSTARTING\nUPDATING\nFAILED" | ||
output: true | ||
- name: reconciling | ||
type: Boolean | ||
description: "Output only. Whether the service instance is currently reconciling.\nTrue | ||
if the current state of the resource does not match the\nintended state, and the | ||
system is working to reconcile them, whether\nor not the change was user initiated.\nRequired | ||
by aip.dev/128#reconciliation " | ||
output: true | ||
- name: labels | ||
type: KeyValueLabels | ||
output: | ||
api_name: | ||
description: "Optional. The labels to associate with this service instance. Labels | ||
may be used for\nfiltering and billing tracking. " | ||
min_version: | ||
ignore_write: | ||
update_verb: | ||
update_url: | ||
immutable: | ||
- name: annotations | ||
type: KeyValueAnnotations | ||
output: | ||
api_name: | ||
description: "Optional. The annotations to associate with this service instance. | ||
Annotations may be\nused to store client information, but are not used by the | ||
server. " | ||
min_version: | ||
ignore_write: | ||
update_verb: | ||
update_url: | ||
immutable: | ||
- name: sparkServiceInstanceConfig | ||
type: NestedObject | ||
properties: [] | ||
description: 'Spark-specific service instance configuration. ' | ||
- name: stateMessage | ||
type: String | ||
description: 'Output only. A message explaining the current state. ' | ||
output: true | ||
- name: serviceAccount | ||
type: String | ||
description: 'Optional. Requested service account to associate with ServiceInstance. ' | ||
- name: effectiveServiceAccount | ||
type: String | ||
description: "Output only. Effective service account associated with ServiceInstance. | ||
This will be\nthe service_account if specified. Otherwise, it will be an automatically\ncreated | ||
per-resource P4SA that also automatically has Fleet Workload\nIdentity bindings | ||
applied. " | ||
output: true | ||
parameters: | ||
- name: location | ||
type: String | ||
description: 'Resource ID segment making up resource `name`. It identifies the resource | ||
within its parent collection as described in https://google.aip.dev/122. See documentation | ||
for resource type `dataprocgdc.googleapis.com/SparkApplication`. ' | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
- name: serviceInstanceId | ||
type: String | ||
description: "Required. Id of the requesting object\nIf auto-generating Id server-side, | ||
remove this field and\nservice_instance_id from the method_signature of Create | ||
RPC " | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
async: | ||
actions: ['create', 'delete'] | ||
type: OpAsync | ||
operation: | ||
path: name | ||
base_url: "{{op_id}}" | ||
wait_ms: 1000 | ||
timeouts: | ||
result: | ||
path: response | ||
resource_inside_response: false | ||
error: | ||
path: error | ||
message: message | ||
immutable: true | ||
examples: | ||
- name: "dataprocgdc_serviceinstance_basic" | ||
primary_resource_id: "service-instance" | ||
vars: | ||
service_instance_id: "tf-e2e-service-instance-basic" | ||
- name: "dataprocgdc_serviceinstance" | ||
primary_resource_id: "service-instance" | ||
vars: | ||
service_instance_id: "tf-e2e-service-instance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- !ruby/object:Api::Product | ||
versions: | ||
- !ruby/object:Api::Product::Version | ||
base_url: https://dataprocgdc.googleapis.com/v1/ | ||
name: ga | ||
name: DataprocGdc | ||
display_name: Dataproc on GDC | ||
scopes: | ||
- https://www.googleapis.com/auth/cloud-platform |
16 changes: 16 additions & 0 deletions
16
mmv1/templates/terraform/examples/dataprocgdc_serviceinstance.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
resource "google_dataproc_gdc_service_instance" "{{$.PrimaryResourceId}}" { | ||
service_instance_id = "{{index $.Vars "service_instance_id"}}" | ||
location = "us-west2" | ||
gdce_cluster { | ||
gdce_cluster = "projects/gdce-cluster-monitoring/locations/us-west2/clusters/gdce-prism-prober-ord106" | ||
} | ||
display_name = "A service instance for a Terraform create test" | ||
labels = { | ||
"test-label": "label-value" | ||
} | ||
annotations = { | ||
"an_annotation": "annotation_value" | ||
} | ||
service_account = "dataprocgdc-cep-workflows@gdce-cluster-monitoring.iam.gserviceaccount.com" | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
mmv1/templates/terraform/examples/dataprocgdc_serviceinstance_basic.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
resource "google_dataproc_gdc_service_instance" "{{$.PrimaryResourceId}}" { | ||
service_instance_id = "{{index $.Vars "service_instance_id"}}" | ||
location = "us-west2" | ||
gdce_cluster { | ||
gdce_cluster = "projects/gdce-cluster-monitoring/locations/us-west2/clusters/gdce-prism-prober-ord106" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters