From 29441d3cf0df35c895e88198dded1c1c3a559083 Mon Sep 17 00:00:00 2001 From: Samir <85890442+sa-progress@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:18:12 +0530 Subject: [PATCH] Automatically generated by magic modules for service: compute_v1 and resource: RegionTargetHttpsProxy. This commit includes the following changes: - Singular Resource ERB File - Plural Resource ERB File - Terraform configuration - api.yaml configuration for product compute_v1 and resource RegionTargetHttpsProxy Signed-off-by: Samir <85890442+sa-progress@users.noreply.github.com> --- mmv1/products/compute/api.yaml | 262 ++++++++++++++++++ ...le_compute_region_target_https_proxies.erb | 5 + ...ogle_compute_region_target_https_proxy.erb | 28 ++ ...e_region_target_https_proxy_attributes.erb | 3 + .../configuration/mm-attributes.yml | 23 +- 5 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxies.erb create mode 100644 mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy.erb create mode 100644 mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy_attributes.erb diff --git a/mmv1/products/compute/api.yaml b/mmv1/products/compute/api.yaml index 5819fd086..d684f68c7 100644 --- a/mmv1/products/compute/api.yaml +++ b/mmv1/products/compute/api.yaml @@ -24830,3 +24830,265 @@ objects: - :FALSE - :TRUE + + + + - !ruby/object:Api::Resource + name: RegionTargetHttpsProxy + base_url: 'projects/{{project}}/regions/{{region}}/targetHttpsProxies' + self_link: 'projects/{{project}}/regions/{{region}}/targetHttpsProxies/{{targetHttpsProxy}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/compute/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts. + properties: + + - !ruby/object:Api::Type::String + name: 'kind' + description: | + [Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies. + - !ruby/object:Api::Type::String + name: 'id' + description: | + [Output Only] The unique identifier for the resource. This identifier is defined by the server. + - !ruby/object:Api::Type::String + name: 'creationTimestamp' + description: | + [Output Only] Creation timestamp in RFC3339 text format. + - !ruby/object:Api::Type::String + name: 'name' + description: | + Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + - !ruby/object:Api::Type::String + name: 'description' + description: | + An optional description of this resource. Provide this property when you create the resource. + - !ruby/object:Api::Type::String + name: 'selfLink' + description: | + [Output Only] Server-defined URL for the resource. + - !ruby/object:Api::Type::String + name: 'selfLinkWithId' + description: | + [Output Only] Server-defined URL for this resource with the resource id. + - !ruby/object:Api::Type::String + name: 'urlMap' + description: | + A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: - https://www.googleapis.compute/v1/projects/project/global/urlMaps/ url-map - projects/project/global/urlMaps/url-map - global/urlMaps/url-map + - !ruby/object:Api::Type::Array + name: 'sslCertificates' + description: | + URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'certificateMap' + description: | + URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}. + - !ruby/object:Api::Type::Enum + name: 'quicOverride' + description: | + Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. - When quic-override is set to NONE, Google manages whether QUIC is used. - When quic-override is set to ENABLE, the load balancer uses QUIC when possible. - When quic-override is set to DISABLE, the load balancer doesn't use QUIC. - If the quic-override flag is not specified, NONE is implied. + values: + - :DISABLE + - :ENABLE + - :NONE + - !ruby/object:Api::Type::String + name: 'sslPolicy' + description: | + URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured. + - !ruby/object:Api::Type::String + name: 'region' + description: | + [Output Only] URL of the region where the regional TargetHttpsProxy resides. This field is not applicable to global TargetHttpsProxies. + - !ruby/object:Api::Type::Boolean + name: 'proxyBind' + description: | + This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them. The default is false. + - !ruby/object:Api::Type::Array + name: 'httpFilters' + description: | + URLs to networkservices.HttpFilter resources enabled for xDS clients using this configuration. For example, https://networkservices.googleapis.com/beta/projects/project/locations/ locationhttpFilters/httpFilter Only filters that handle outbound connection and stream events may be specified. These filters work in conjunction with a default set of HTTP filters that may already be configured by Traffic Director. Traffic Director will determine the final location of these filters within xDS configuration based on the name of the HTTP filter. If Traffic Director positions multiple filters at the same location, those filters will be in the same order as specified in this list. httpFilters only applies for loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'serverTlsPolicy' + description: | + Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. serverTlsPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. + - !ruby/object:Api::Type::String + name: 'authentication' + description: | + [Deprecated] Use serverTlsPolicy instead. + - !ruby/object:Api::Type::String + name: 'authorizationPolicy' + description: | + Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact. + - !ruby/object:Api::Type::String + name: 'authorization' + description: | + [Deprecated] Use authorizationPolicy instead. + - !ruby/object:Api::Type::String + name: 'fingerprint' + description: | + Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy. + - !ruby/object:Api::Type::Integer + name: 'httpKeepAliveTimeoutSec' + description: | + Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported. + - !ruby/object:Api::Type::Enum + name: 'tlsEarlyData' + description: | + Specifies whether TLS 1.3 0-RTT Data ("Early Data") should be accepted for this service. Early Data allows a TLS resumption handshake to include the initial application payload (a HTTP request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP (HTTP/2) as well as over UDP (QUIC/h3). This can improve application performance, especially on networks where interruptions may be common, such as on mobile. Requests with Early Data will have the "Early-Data" HTTP header set on the request, with a value of "1", to allow the backend to determine whether Early Data was included. Note: TLS Early Data may allow requests to be replayed, as the data is sent to the backend before the handshake has fully completed. Applications that allow idempotent HTTP methods to make non-idempotent changes, such as a GET request updating a database, should not accept Early Data on those requests, and reject requests with the "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) status code, in order to remain RFC compliant. The default value is DISABLED. + values: + - :DISABLED + - :PERMISSIVE + - :STRICT + + + + + - !ruby/object:Api::Resource + name: RegionTargetHttpsProxy + base_url: 'projects/{{project}}/regions/{{region}}/targetHttpsProxies' + self_link: 'projects/{{project}}/regions/{{region}}/targetHttpsProxies/{{targetHttpsProxy}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/compute/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts. + properties: + + - !ruby/object:Api::Type::String + name: 'kind' + description: | + [Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies. + - !ruby/object:Api::Type::String + name: 'id' + description: | + [Output Only] The unique identifier for the resource. This identifier is defined by the server. + - !ruby/object:Api::Type::String + name: 'creationTimestamp' + description: | + [Output Only] Creation timestamp in RFC3339 text format. + - !ruby/object:Api::Type::String + name: 'name' + description: | + Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + - !ruby/object:Api::Type::String + name: 'description' + description: | + An optional description of this resource. Provide this property when you create the resource. + - !ruby/object:Api::Type::String + name: 'selfLink' + description: | + [Output Only] Server-defined URL for the resource. + - !ruby/object:Api::Type::String + name: 'selfLinkWithId' + description: | + [Output Only] Server-defined URL for this resource with the resource id. + - !ruby/object:Api::Type::String + name: 'urlMap' + description: | + A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: - https://www.googleapis.compute/v1/projects/project/global/urlMaps/ url-map - projects/project/global/urlMaps/url-map - global/urlMaps/url-map + - !ruby/object:Api::Type::Array + name: 'sslCertificates' + description: | + URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'certificateMap' + description: | + URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}. + - !ruby/object:Api::Type::Enum + name: 'quicOverride' + description: | + Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. - When quic-override is set to NONE, Google manages whether QUIC is used. - When quic-override is set to ENABLE, the load balancer uses QUIC when possible. - When quic-override is set to DISABLE, the load balancer doesn't use QUIC. - If the quic-override flag is not specified, NONE is implied. + values: + - :DISABLE + - :ENABLE + - :NONE + - !ruby/object:Api::Type::String + name: 'sslPolicy' + description: | + URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured. + - !ruby/object:Api::Type::String + name: 'region' + description: | + [Output Only] URL of the region where the regional TargetHttpsProxy resides. This field is not applicable to global TargetHttpsProxies. + - !ruby/object:Api::Type::Boolean + name: 'proxyBind' + description: | + This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them. The default is false. + - !ruby/object:Api::Type::Array + name: 'httpFilters' + description: | + URLs to networkservices.HttpFilter resources enabled for xDS clients using this configuration. For example, https://networkservices.googleapis.com/beta/projects/project/locations/ locationhttpFilters/httpFilter Only filters that handle outbound connection and stream events may be specified. These filters work in conjunction with a default set of HTTP filters that may already be configured by Traffic Director. Traffic Director will determine the final location of these filters within xDS configuration based on the name of the HTTP filter. If Traffic Director positions multiple filters at the same location, those filters will be in the same order as specified in this list. httpFilters only applies for loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'serverTlsPolicy' + description: | + Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. serverTlsPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. + - !ruby/object:Api::Type::String + name: 'authentication' + description: | + [Deprecated] Use serverTlsPolicy instead. + - !ruby/object:Api::Type::String + name: 'authorizationPolicy' + description: | + Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact. + - !ruby/object:Api::Type::String + name: 'authorization' + description: | + [Deprecated] Use authorizationPolicy instead. + - !ruby/object:Api::Type::String + name: 'fingerprint' + description: | + Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy. + - !ruby/object:Api::Type::Integer + name: 'httpKeepAliveTimeoutSec' + description: | + Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported. + - !ruby/object:Api::Type::Enum + name: 'tlsEarlyData' + description: | + Specifies whether TLS 1.3 0-RTT Data ("Early Data") should be accepted for this service. Early Data allows a TLS resumption handshake to include the initial application payload (a HTTP request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP (HTTP/2) as well as over UDP (QUIC/h3). This can improve application performance, especially on networks where interruptions may be common, such as on mobile. Requests with Early Data will have the "Early-Data" HTTP header set on the request, with a value of "1", to allow the backend to determine whether Early Data was included. Note: TLS Early Data may allow requests to be replayed, as the data is sent to the backend before the handshake has fully completed. Applications that allow idempotent HTTP methods to make non-idempotent changes, such as a GET request updating a database, should not accept Early Data on those requests, and reject requests with the "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) status code, in order to remain RFC compliant. The default value is DISABLED. + values: + - :DISABLED + - :PERMISSIVE + - :STRICT + diff --git a/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxies.erb b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxies.erb new file mode 100644 index 000000000..eb0685705 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxies.erb @@ -0,0 +1,5 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> + <% region_target_https_proxy = grab_attributes(pwd)['region_target_https_proxy'] -%> + describe google_compute_region_target_https_proxies(project: <%= gcp_project_id -%>, region: <%= doc_generation ? "' #{region_target_https_proxy['region']}'":"region_target_https_proxy['region']" -%>) do + it { should exist } + end \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy.erb b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy.erb new file mode 100644 index 000000000..453da2d14 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy.erb @@ -0,0 +1,28 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> +<% region_target_https_proxy = grab_attributes(pwd)['region_target_https_proxy'] -%> +describe google_compute_region_target_https_proxy(project: <%= gcp_project_id -%>, region: <%= doc_generation ? "' #{region_target_https_proxy['region']}'":"region_target_https_proxy['region']" -%>, targetHttpsProxy: <%= doc_generation ? "' #{region_target_https_proxy['targetHttpsProxy']}'":"region_target_https_proxy['targetHttpsProxy']" -%>) do + it { should exist } + its('kind') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['kind']}'" : "region_target_https_proxy['kind']" -%> } + its('id') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['id']}'" : "region_target_https_proxy['id']" -%> } + its('creation_timestamp') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['creation_timestamp']}'" : "region_target_https_proxy['creation_timestamp']" -%> } + its('name') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['name']}'" : "region_target_https_proxy['name']" -%> } + its('description') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['description']}'" : "region_target_https_proxy['description']" -%> } + its('self_link') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['self_link']}'" : "region_target_https_proxy['self_link']" -%> } + its('self_link_with_id') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['self_link_with_id']}'" : "region_target_https_proxy['self_link_with_id']" -%> } + its('url_map') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['url_map']}'" : "region_target_https_proxy['url_map']" -%> } + its('certificate_map') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['certificate_map']}'" : "region_target_https_proxy['certificate_map']" -%> } + its('quic_override') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['quic_override']}'" : "region_target_https_proxy['quic_override']" -%> } + its('ssl_policy') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['ssl_policy']}'" : "region_target_https_proxy['ssl_policy']" -%> } + its('region') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['region']}'" : "region_target_https_proxy['region']" -%> } + its('server_tls_policy') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['server_tls_policy']}'" : "region_target_https_proxy['server_tls_policy']" -%> } + its('authentication') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['authentication']}'" : "region_target_https_proxy['authentication']" -%> } + its('authorization_policy') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['authorization_policy']}'" : "region_target_https_proxy['authorization_policy']" -%> } + its('authorization') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['authorization']}'" : "region_target_https_proxy['authorization']" -%> } + its('fingerprint') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['fingerprint']}'" : "region_target_https_proxy['fingerprint']" -%> } + its('tls_early_data') { should cmp <%= doc_generation ? "'#{region_target_https_proxy['tls_early_data']}'" : "region_target_https_proxy['tls_early_data']" -%> } + +end + +describe google_compute_region_target_https_proxy(project: <%= gcp_project_id -%>, region: <%= doc_generation ? "' #{region_target_https_proxy['region']}'":"region_target_https_proxy['region']" -%>, targetHttpsProxy: <%= doc_generation ? "' #{region_target_https_proxy['targetHttpsProxy']}'":"region_target_https_proxy['targetHttpsProxy']" -%>) do + it { should_not exist } +end \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy_attributes.erb b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy_attributes.erb new file mode 100644 index 000000000..c73273b10 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_compute_region_target_https_proxy/google_compute_region_target_https_proxy_attributes.erb @@ -0,0 +1,3 @@ +gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.') + + region_target_https_proxy = input('region_target_https_proxy', value: <%= JSON.pretty_generate(grab_attributes(pwd)['region_target_https_proxy']) -%>, description: 'region_target_https_proxy description') \ No newline at end of file diff --git a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml index e196b7361..541c421e3 100644 --- a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml +++ b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml @@ -1116,4 +1116,25 @@ region_disk_type: valid_disk_size : "value_validdisksize" zone : "value_zone" self_link : "value_selflink" - default_disk_size_gb : "value_defaultdisksizegb" \ No newline at end of file + default_disk_size_gb : "value_defaultdisksizegb" +region_target_https_proxy: + project : "value_project" + region : "value_region" + target_https_proxy : "value_targethttpsproxy" + kind : "value_kind" + id : "value_id" + creation_timestamp : "value_creationtimestamp" + name : "value_name" + description : "value_description" + self_link : "value_selflink" + self_link_with_id : "value_selflinkwithid" + url_map : "value_urlmap" + certificate_map : "value_certificatemap" + quic_override : "value_quicoverride" + ssl_policy : "value_sslpolicy" + server_tls_policy : "value_servertlspolicy" + authentication : "value_authentication" + authorization_policy : "value_authorizationpolicy" + authorization : "value_authorization" + fingerprint : "value_fingerprint" + tls_early_data : "value_tlsearlydata" \ No newline at end of file