Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new resource for Service Project for Apphub #10048

Merged
merged 17 commits into from
Mar 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 62 additions & 48 deletions mmv1/products/apphub/ServiceProject.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Copyright 2023 Google Inc.
eshagoel06 marked this conversation as resolved.
Show resolved Hide resolved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


--- !ruby/object:Api::Resource
base_url: projects/{{project}}/locations/global/serviceProjectAttachments
create_url: projects/{{project}}/locations/global/serviceProjectAttachments?serviceProjectAttachmentId={{service_project_attachment_id}}
self_link: projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
id_format: projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
import_format:
- projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
- projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
name: ServiceProject
description: |
Represents a Service project attachment to the Host Project.
Expand All @@ -13,53 +27,53 @@ autogen_async: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
decoder: 'templates/terraform/decoders/apphub_service_project.go.erb'
examples:
- !ruby/object:Provider::Terraform::Examples
name: "service_project_basic"
primary_resource_id: "example"
config_path: "templates/terraform/examples/apphub_service_project_basic.tf.erb"
vars:
service_project_attachment_id: "project-1"
- !ruby/object:Provider::Terraform::Examples
name: "service_project_basic"
primary_resource_id: "example"
config_path: "templates/terraform/examples/apphub_service_project_basic.tf.erb"
vars:
service_project_attachment_id: "project-1"
properties:
- !ruby/object:Api::Type::String
name: name
description: |
"Identifier. The resource name of a ServiceProjectAttachment. Format:\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\" "
- !ruby/object:Api::Type::String
name: serviceProject
custom_expand: 'templates/terraform/custom_expand/apphub_service_project.go.erb'
custom_flatten: 'templates/terraform/custom_flatten/apphub_service_project.go.erb'
description: |
"Required. Immutable. Service project name in the format: \"projects/abc\"
or \"projects/123\". As input, project name with either project id or number
are accepted. As output, this field will contain project number. "
immutable: true
- !ruby/object:Api::Type::String
name: createTime
description: 'Output only. Create time. '
output: true
- !ruby/object:Api::Type::String
name: uid
description: "Output only. A globally unique identifier (in UUID4 format) for the `ServiceProjectAttachment`. "
output: true
- !ruby/object:Api::Type::Enum
name: 'state'
description: |
ServiceProjectAttachment state.
output: true
values:
- :STATE_UNSPECIFIED
- :CREATING
- :ACTIVE
- :DELETING
- !ruby/object:Api::Type::String
name: name
description: |
"Identifier. The resource name of a ServiceProjectAttachment. Format:\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\" "
- !ruby/object:Api::Type::String
name: serviceProject
custom_expand: 'templates/terraform/custom_expand/apphub_service_project.go.erb'
custom_flatten: 'templates/terraform/custom_flatten/apphub_service_project.go.erb'
description: |
"Required. Immutable. Service project name in the format: \"projects/abc\"
or \"projects/123\". As input, project name with either project id or number
are accepted. As output, this field will contain project number. "
immutable: true
- !ruby/object:Api::Type::String
name: createTime
description: 'Output only. Create time. '
output: true
- !ruby/object:Api::Type::String
name: uid
description: "Output only. A globally unique identifier (in UUID4 format) for the `ServiceProjectAttachment`. "
output: true
- !ruby/object:Api::Type::Enum
name: 'state'
description: |
ServiceProjectAttachment state.
output: true
values:
- :STATE_UNSPECIFIED
- :CREATING
- :ACTIVE
- :DELETING
parameters:
- !ruby/object:Api::Type::String
name: serviceProjectAttachmentId
description: "Required. The service project attachment identifier must contain the
project_id of the service project specified in the service_project_attachment.service_project
field. Hint: \"projects/{project_id}\" "
url_param_only: true
required: true
immutable: true
- !ruby/object:Api::Type::String
name: serviceProjectAttachmentId
description: "Required. The service project attachment identifier must contain the
project_id of the service project specified in the service_project_attachment.service_project
field. Hint: \"projects/{project_id}\" "
url_param_only: true
required: true
immutable: true
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: name
Expand All @@ -73,8 +87,8 @@ async: !ruby/object:Api::OpAsync
path: done
complete: true
allowed:
- true
- false
- true
- false
error: !ruby/object:Api::OpAsync::Error
path: error
message: message
Loading