ComputeServiceAttachment


Property Value
Google Cloud Service Name Compute Engine
Google Cloud Service Documentation /compute/docs/
Google Cloud REST Resource Name beta.serviceAttachments
Google Cloud REST Resource Documentation /compute/docs/reference/rest/beta/serviceAttachments
Config Connector Resource Short Names gcpcomputeserviceattachment
gcpcomputeserviceattachments
computeserviceattachment
Config Connector Service Name compute.googleapis.com
Config Connector Resource Fully Qualified Name computeserviceattachments.compute.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No
Config Connector Default Average Reconcile Interval In Seconds 600

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/state-into-spec

Spec

Schema

connectionPreference: string
consumerAcceptLists:
- connectionLimit: integer
  projectRef:
    external: string
    name: string
    namespace: string
consumerRejectLists:
- external: string
  name: string
  namespace: string
description: string
enableProxyProtocol: boolean
location: string
natSubnets:
- external: string
  name: string
  namespace: string
projectRef:
  external: string
  name: string
  namespace: string
resourceID: string
targetServiceRef:
  external: string
  name: string
  namespace: string
Fields

connectionPreference

Required

string

The connection preference of service attachment. The value can be set to `ACCEPT_AUTOMATIC`. An `ACCEPT_AUTOMATIC` service attachment is one that always accepts the connection from consumer forwarding rules. Possible values: CONNECTION_PREFERENCE_UNSPECIFIED, ACCEPT_AUTOMATIC, ACCEPT_MANUAL

consumerAcceptLists

Optional

list (object)

Projects that are allowed to connect to this service attachment.

consumerAcceptLists[]

Optional

object

consumerAcceptLists[].connectionLimit

Optional

integer

The value of the limit to set.

consumerAcceptLists[].projectRef

Required*

object

consumerAcceptLists[].projectRef.external

Optional

string

The project id or number for the project to set the limit for. Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).

consumerAcceptLists[].projectRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

consumerAcceptLists[].projectRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

consumerRejectLists

Optional

list (object)

consumerRejectLists[]

Optional

object

consumerRejectLists[].external

Optional

string

Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).

consumerRejectLists[].name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

consumerRejectLists[].namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

description

Optional

string

An optional description of this resource. Provide this property when you create the resource.

enableProxyProtocol

Optional

boolean

Immutable. If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.

location

Required

string

Immutable. The location for the resource

natSubnets

Required

list (object)

natSubnets[]

Required

object

natSubnets[].external

Optional

string

Allowed value: The `selfLink` field of a `ComputeSubnetwork` resource.

natSubnets[].name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

natSubnets[].namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

projectRef

Required

object

Immutable. The Project that this resource belongs to.

projectRef.external

Optional

string

The project for the resource Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).

projectRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

projectRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceID

Optional

string

Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.

targetServiceRef

Required

object

Immutable.

targetServiceRef.external

Optional

string

The URL of a service serving the endpoint identified by this service attachment. Allowed value: The `selfLink` field of a `ComputeForwardingRule` resource.

targetServiceRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

targetServiceRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

* Field is required when parent field is specified

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
connectedEndpoints:
- endpoint: string
  pscConnectionId: integer
  status: string
fingerprint: string
id: integer
observedGeneration: integer
pscServiceAttachmentId:
  high: integer
  low: integer
region: string
selfLink: string
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

connectedEndpoints

list (object)

An array of connections for all the consumers connected to this service attachment.

connectedEndpoints[]

object

connectedEndpoints[].endpoint

string

The url of a connected endpoint.

connectedEndpoints[].pscConnectionId

integer

The PSC connection id of the connected endpoint.

connectedEndpoints[].status

string

The status of a connected endpoint to this service attachment. Possible values: PENDING, RUNNING, DONE

fingerprint

string

Fingerprint of this resource. This field is used internally during updates of this resource.

id

integer

The unique identifier for the resource type. The server generates this identifier.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

pscServiceAttachmentId

object

An 128-bit global unique ID of the PSC service attachment.

pscServiceAttachmentId.high

integer

pscServiceAttachmentId.low

integer

region

string

URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

selfLink

string

Server-defined URL for the resource.

Sample YAML(s)

Typical Use Case

# Copyright 2021 Google LLC
#
# 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.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeServiceAttachment
metadata:
  name: computeserviceattachment-sample
spec:
  projectRef:
     # Replace ${PROJECT_ID?} with your project ID
     external: "projects/${PROJECT_ID?}"
  location: "us-west2"
  description: "A sample service attachment"
  targetServiceRef:
    name: "computeserviceattachment-dep"
  connectionPreference: "ACCEPT_MANUAL"
  natSubnets:
  - name: "computeserviceattachment-dep1"
  enableProxyProtocol: false
  consumerRejectLists:
  - name: "computeserviceattachment-dep1"
  consumerAcceptLists:
  - projectRef:
      name: "computeserviceattachment-dep2"
    connectionLimit: 2
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
  name: computeserviceattachment-dep
spec:
  location: "us-west2"
  networkRef:
    name: "computeserviceattachment-dep"
  loadBalancingScheme: "INTERNAL"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeForwardingRule
metadata:
  name: computeserviceattachment-dep
spec:
  location: "us-west2"
  networkRef:
    name: "computeserviceattachment-dep"
  subnetworkRef:
    name: "computeserviceattachment-dep3"
  description: "A test forwarding rule with internal load balancing scheme"
  loadBalancingScheme: "INTERNAL"
  backendServiceRef:
    name: "computeserviceattachment-dep"
  networkTier: "PREMIUM"
  allPorts: true
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computeserviceattachment-dep
spec:
  autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computeserviceattachment-dep1
spec:
  region: "us-west2"
  ipCidrRange: "10.2.0.0/16"
  networkRef:
    name: "computeserviceattachment-dep"
  purpose: "PRIVATE_SERVICE_CONNECT"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computeserviceattachment-dep2
spec:
  region: "us-west2"
  ipCidrRange: "10.3.0.0/16"
  networkRef:
    name: "computeserviceattachment-dep"
  purpose: "PRIVATE_SERVICE_CONNECT"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computeserviceattachment-dep3
spec:
  region: "us-west2"
  ipCidrRange: "10.4.0.0/16"
  networkRef:
    name: "computeserviceattachment-dep"
  purpose: "PRIVATE"
---
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
metadata:
  name: computeserviceattachment-dep1
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization
    external: "${ORG_ID?}"
  name: "computeserviceattachment-dep1"
---
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
metadata:
  name: computeserviceattachment-dep2
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization
    external: "${ORG_ID?}"
  name: "computeserviceattachment-dep2"