Skip to content

Commit

Permalink
1. Addressing PR comments
Browse files Browse the repository at this point in the history
2. Setting appGateway resoruce to be non updatable.
3. Added a test to verify update/patch ot app connector
  • Loading branch information
palramanathan committed Nov 10, 2022
1 parent fd081de commit eb7a7e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 51 deletions.
49 changes: 6 additions & 43 deletions mmv1/products/beyondcorp/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,15 @@ objects:
and with direct access to the application instances. It is used to establish connectivity between the
remote enterprise environment and GCP. It initiates connections to the applications and can proxy the
data from users over the connection.
min_version: ga
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector'
api: 'https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appconnectors'
base_url: projects/{{project}}/locations/{{region}}/appConnectors
self_link: projects/{{project}}/locations/{{region}}/appConnectors/{{name}}
create_url: projects/{{project}}/locations/{{region}}/appConnectors?app_connector_id={{name}}
delete_url: projects/{{project}}/locations/{{region}}/appConnectors/{{name}}
update_url: projects/{{project}}/locations/{{region}}/appConnectors/{{name}}
update_verb: :PATCH
update_mask: true
# iam_policy: !ruby/object:Api::Resource::IamPolicy
# parent_resource_attribute: name
# method_name_separator: ':'
# fetch_iam_policy_verb: :GET
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand All @@ -72,6 +65,7 @@ objects:
input: true
description: |
ID of the AppConnector.
url_param_only: true
- !ruby/object:Api::Type::String
name: 'region'
description: |
Expand All @@ -96,26 +90,13 @@ objects:
name: 'serviceAccount'
description: |
ServiceAccount represents a GCP service account.
required: true
properties:
- !ruby/object:Api::Type::String
name: 'email'
description: |
Email address of the service account.
- !ruby/object:Api::Type::Time
name: 'createTime'
description: |
Timestamp when the resource was created.
output: true
- !ruby/object:Api::Type::Time
name: 'updateTime'
description: |
Timestamp when the resource was updated.
output: true
- !ruby/object:Api::Type::String
name: 'uid'
description: |
A unique identifier for the instance generated by the system.
output: true
required: true
- !ruby/object:Api::Type::Enum
name: 'state'
output: true
Expand All @@ -134,19 +115,15 @@ objects:
A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates
all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be
authorised for a single AppGateway.
min_version: ga
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector'
api: 'https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appgateways'
base_url: projects/{{project}}/locations/{{region}}/appGateways
self_link: projects/{{project}}/locations/{{region}}/appGateways/{{name}}
create_url: projects/{{project}}/locations/{{region}}/appGateways?app_gateway_id={{name}}
delete_url: projects/{{project}}/locations/{{region}}/appGateways/{{name}}
# iam_policy: !ruby/object:Api::Resource::IamPolicy
# parent_resource_attribute: name
# method_name_separator: ':'
# fetch_iam_policy_verb: :GET
# This resources is not updatable
input: true
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
Expand Down Expand Up @@ -174,6 +151,7 @@ objects:
input: true
description: |
ID of the AppGateway.
url_param_only: true
- !ruby/object:Api::Type::String
name: 'region'
description: |
Expand Down Expand Up @@ -204,21 +182,6 @@ objects:
name: 'labels'
description: |
Resource labels to represent user provided metadata.
- !ruby/object:Api::Type::Time
name: 'createTime'
description: |
Timestamp when the resource was created.
output: true
- !ruby/object:Api::Type::Time
name: 'updateTime'
description: |
Timestamp when the resource was updated.
output: true
- !ruby/object:Api::Type::String
name: 'uid'
description: |
A unique identifier for the instance generated by the system.
output: true
- !ruby/object:Api::Type::Enum
name: 'state'
output: true
Expand Down
8 changes: 0 additions & 8 deletions mmv1/products/beyondcorp/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
app_connector_name: "my-app-connector"
account_id: "my-account"
display_name: "some display name"
properties:
name: !ruby/object:Overrides::Terraform::PropertyOverride
custom_expand: 'templates/terraform/custom_expand/shortname_to_url.go.erb'
custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.erb'
AppGateway: !ruby/object:Overrides::Terraform::ResourceOverride
autogen_async: true
examples:
Expand All @@ -51,10 +47,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
vars:
app_gateway_name: "my-app-gateway"
display_name: "some display name"
properties:
name: !ruby/object:Overrides::Terraform::PropertyOverride
custom_expand: 'templates/terraform/custom_expand/shortname_to_url.go.erb'
custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.erb'
# This is for copying files over
files: !ruby/object:Provider::Config::Files
# These files have templating (ERB) code that will be run.
Expand Down

0 comments on commit eb7a7e4

Please sign in to comment.