Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

IPsec-encrypted Interconnect #521

Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion docs/resources/google_compute_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Properties that can be accessed from the `google_compute_address` resource:

* `name`: Name of the resource. 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.

* `purpose`: The purpose of this resource. Possible values include: * GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. * SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers. * VPC_PEERING for addresses that are reserved for VPC peer networks.
* `purpose`: The purpose of this resource, which can be one of the following values: * GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. * SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers. * VPC_PEERING for addresses that are reserved for VPC peer networks. * IPSEC_INTERCONNECT (Beta only) for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources. This should only be set when using an Internal address.

* `network_tier`: The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
Possible values:
Expand All @@ -89,6 +89,10 @@ Properties that can be accessed from the `google_compute_address` resource:
* RESERVED
* IN_USE

* `network`: (Beta only) The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

* `prefix_length`: (Beta only) The prefix length if the resource represents an IP range.

* `region`: URL of the region where the regional address resides. This field is not applicable to global addresses.


Expand Down
2 changes: 2 additions & 0 deletions docs/resources/google_compute_addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ See [google_compute_address.md](google_compute_address.md) for more detailed inf
* `labels`: (Beta only) an array of `google_compute_address` labels
* `label_fingerprints`: (Beta only) an array of `google_compute_address` label_fingerprint
* `statuses`: an array of `google_compute_address` status
* `networks`: (Beta only) an array of `google_compute_address` network
* `prefix_lengths`: (Beta only) an array of `google_compute_address` prefix_length
* `regions`: an array of `google_compute_address` region

## Filter Criteria
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/google_compute_router.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Properties that can be accessed from the `google_compute_router` resource:

* `description`: User-specified description for the IP range.

* `encrypted_interconnect_router`: (Beta only) Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature). Not currently available publicly.

* `region`: Region where the router resides.


Expand Down
1 change: 1 addition & 0 deletions docs/resources/google_compute_routers.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ See [google_compute_router.md](google_compute_router.md) for more detailed infor
* `descriptions`: an array of `google_compute_router` description
* `networks`: an array of `google_compute_router` network
* `bgps`: an array of `google_compute_router` bgp
* `encrypted_interconnect_routers`: (Beta only) an array of `google_compute_router` encrypted_interconnect_router
* `regions`: an array of `google_compute_router` region

## Filter Criteria
Expand Down
4 changes: 4 additions & 0 deletions libraries/google_compute_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class ComputeAddress < GcpResourceBase
attr_reader :labels
attr_reader :label_fingerprint
attr_reader :status
attr_reader :network
attr_reader :prefix_length
attr_reader :region

def initialize(params)
Expand All @@ -58,6 +60,8 @@ def parse
@labels = @fetched['labels']
@label_fingerprint = @fetched['labelFingerprint']
@status = @fetched['status']
@network = @fetched['network']
@prefix_length = @fetched['prefixLength']
@region = @fetched['region']
end

Expand Down
4 changes: 4 additions & 0 deletions libraries/google_compute_addresses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class ComputeAddresss < GcpResourceBase
filter_table_config.add(:labels, field: :labels)
filter_table_config.add(:label_fingerprints, field: :label_fingerprint)
filter_table_config.add(:statuses, field: :status)
filter_table_config.add(:networks, field: :network)
filter_table_config.add(:prefix_lengths, field: :prefix_length)
filter_table_config.add(:regions, field: :region)

filter_table_config.connect(self, :table)
Expand Down Expand Up @@ -89,6 +91,8 @@ def transformers
'labels' => ->(obj) { return :labels, obj['labels'] },
'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] },
'status' => ->(obj) { return :status, obj['status'] },
'network' => ->(obj) { return :network, obj['network'] },
'prefixLength' => ->(obj) { return :prefix_length, obj['prefixLength'] },
'region' => ->(obj) { return :region, obj['region'] },
}
end
Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ComputeRouter < GcpResourceBase
attr_reader :description
attr_reader :network
attr_reader :bgp
attr_reader :encrypted_interconnect_router
attr_reader :region

def initialize(params)
Expand All @@ -46,6 +47,7 @@ def parse
@description = @fetched['description']
@network = @fetched['network']
@bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched['bgp'], to_s)
@encrypted_interconnect_router = @fetched['encryptedInterconnectRouter']
@region = @fetched['region']
end

Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_routers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ComputeRouters < GcpResourceBase
filter_table_config.add(:descriptions, field: :description)
filter_table_config.add(:networks, field: :network)
filter_table_config.add(:bgps, field: :bgp)
filter_table_config.add(:encrypted_interconnect_routers, field: :encrypted_interconnect_router)
filter_table_config.add(:regions, field: :region)

filter_table_config.connect(self, :table)
Expand Down Expand Up @@ -75,6 +76,7 @@ def transformers
'description' => ->(obj) { return :description, obj['description'] },
'network' => ->(obj) { return :network, obj['network'] },
'bgp' => ->(obj) { return :bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s) },
'encryptedInterconnectRouter' => ->(obj) { return :encrypted_interconnect_router, obj['encryptedInterconnectRouter'] },
'region' => ->(obj) { return :region, obj['region'] },
}
end
Expand Down