-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
658 additions
and
5 deletions.
There are no files selected for viewing
Submodule ansible
updated
5 files
Submodule compute
updated
13 files
Submodule compute
updated
14 files
Submodule terraform
updated
from 5be332 to a099f5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"result": { | ||
"covered_percent": 80.43 | ||
"covered_percent": 80.04 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright 2018 Google Inc. | ||
# 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:Provider::Ansible::Example | ||
dependencies: | ||
- !ruby/object:Provider::Ansible::Task | ||
name: gcp_compute_network | ||
register: network | ||
code: | | ||
name: <%= dependency_name('network', 'router') %> | ||
project: <%= ctx[:project] %> | ||
auth_kind: <%= ctx[:auth_kind] %> | ||
service_account_file: <%= ctx[:service_account_file] %> | ||
task: !ruby/object:Provider::Ansible::Task | ||
name: gcp_compute_router | ||
code: | | ||
name: <%= ctx[:name] %> | ||
network: "{{ network }}" | ||
bgp: | ||
asn: 64514 | ||
advertise_mode: 'CUSTOM' | ||
advertised_groups: | ||
- 'ALL_SUBNETS' | ||
advertised_ip_ranges: | ||
- range: '1.2.3.4' | ||
- range: '6.7.0.0/16' | ||
project: <%= ctx[:project] %> | ||
auth_kind: <%= ctx[:auth_kind] %> | ||
service_account_file: <%= ctx[:service_account_file] %> | ||
verifier: !ruby/object:Provider::Ansible::Verifier | ||
command: | | ||
gcloud compute routers describe | ||
--project="{{ gcp_project}}" | ||
--region=us-west1 | ||
"{{ resource_name }}" | ||
failure: !ruby/object:Provider::Ansible::ComputeFailureCondition | ||
region: regions/us-west1 | ||
type: routes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<% if false # the license inside this if block assertains to this file -%> | ||
# Copyright 2018 Google Inc. | ||
# 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. | ||
<% end -%> | ||
<% if name != 'README.md' -%> | ||
<%= compile 'templates/license.erb' -%> | ||
<%= lines(autogen_notice :chef) -%> | ||
<%= compile 'templates/chef/example~auth.rb.erb' -%> | ||
gcompute_region <%= example_resource_name('some-region') -%> do | ||
action :create | ||
r_label 'us-west1' | ||
project ENV['PROJECT'] # ex: 'my-test-project' | ||
credential 'mycred' | ||
end | ||
<% else # name == README.md -%> | ||
# Router requires a network and a region, so define them in your recipe: | ||
# - gcompute_region 'some-region' do ... end | ||
<% end # name == README.md -%> | ||
gcompute_router <%= example_resource_name('my-router') -%> do | ||
action :delete | ||
region <%= example_resource_name('some-region') %> | ||
project ENV['PROJECT'] # ex: 'my-test-project' | ||
credential 'mycred' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<% if false # the license inside this if block assertains to this file -%> | ||
# Copyright 2018 Google Inc. | ||
# 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. | ||
<% end -%> | ||
<% unless name == 'README.md' -%> | ||
<%= compile 'templates/license.erb' -%> | ||
<%= lines(autogen_notice :chef) -%> | ||
<%= compile 'templates/chef/example~auth.rb.erb' -%> | ||
<% end -%> | ||
<% if name == "README.md" -%> | ||
# Router requires a network and a region, so define them in your recipe: | ||
# - gcompute_network 'my-network' do ... end | ||
# - gcompute_region 'some-region' do ... end | ||
<% else # name == README.md -%> | ||
gcompute_network <%= example_resource_name('my-network') -%> do | ||
action :create | ||
project ENV['PROJECT'] # ex: 'my-test-project' | ||
credential 'mycred' | ||
end | ||
gcompute_region <%= example_resource_name('some-region') -%> do | ||
action :create | ||
r_label 'us-west1' | ||
project ENV['PROJECT'] # ex: 'my-test-project' | ||
credential 'mycred' | ||
end | ||
<% end # name == README.md -%> | ||
gcompute_router <%= example_resource_name('my-router') -%> do | ||
action :create | ||
bgp( | ||
asn 64514 | ||
advertise_mode 'CUSTOM' | ||
advertised_groups ['ALL_SUBNETS'] | ||
advertised_ip_ranges [ | ||
{ | ||
range '1.2.3.4' | ||
} | ||
{ | ||
range '6.7.0.0/16' | ||
} | ||
] | ||
) | ||
network <%= example_resource_name('my-network') %> | ||
region <%= example_resource_name('some-region') %> | ||
project ENV['PROJECT'] # ex: 'my-test-project' | ||
credential 'mycred' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<% if false # the license inside this if block assertains to this file -%> | ||
# Copyright 2018 Google Inc. | ||
# 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. | ||
<% end -%> | ||
<% if name != "README.md" -%> | ||
<%= compile 'templates/license.erb' -%> | ||
|
||
<%= lines(autogen_notice :puppet) -%> | ||
|
||
<%= compile 'templates/puppet/examples~credential.pp.erb' -%> | ||
|
||
gcompute_region { <%= example_resource_name('some-region') -%>: | ||
name => 'us-west1', | ||
project => $project, # e.g. 'my-test-project' | ||
credential => 'mycred', | ||
} | ||
|
||
<% else # name == README.md -%> | ||
# Router requires a network and a region, so define them in your manifest: | ||
# - gcompute_region { 'some-region': ... } | ||
<% end # name == README.md -%> | ||
gcompute_router { <%= example_resource_name('my-router') -%>: | ||
ensure => absent, | ||
region => <%= example_resource_name('some-region') -%>, | ||
project => $project, # e.g. 'my-test-project' | ||
credential => 'mycred', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<% if false # the license inside this if block assertains to this file -%> | ||
# Copyright 2018 Google Inc. | ||
# 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. | ||
<% end -%> | ||
<% unless name == "README.md" -%> | ||
<%= compile 'templates/license.erb' -%> | ||
|
||
<%= lines(autogen_notice :puppet) -%> | ||
|
||
<%= compile 'templates/puppet/examples~credential.pp.erb' -%> | ||
|
||
<% end # name == README.md -%> | ||
<% if name == "README.md" -%> | ||
# Router requires a network and a region, so define them in your manifest: | ||
# - gcompute_network { 'my-network': ensure => present } | ||
# - gcompute_region { 'some-region': ... } | ||
<% else # name == README.md -%> | ||
gcompute_network { <%= example_resource_name('my-network') -%>: | ||
ensure => present, | ||
project => $project, # e.g. 'my-test-project' | ||
credential => 'mycred', | ||
} | ||
|
||
gcompute_region { <%= example_resource_name('some-region') -%>: | ||
name => 'us-west1', | ||
project => $project, # e.g. 'my-test-project' | ||
credential => 'mycred', | ||
} | ||
|
||
<% end # name == README.md -%> | ||
gcompute_router { <%= example_resource_name('my-router') -%>: | ||
ensure => present, | ||
network => <%= example_resource_name('my-network') -%>, | ||
bgp => { | ||
asn => 64514, | ||
advertise_mode => 'CUSTOM', | ||
advertised_groups => ['ALL_SUBNETS'], | ||
advertised_ip_ranges => [ | ||
{ | ||
range => '1.2.3.4', | ||
}, | ||
{ | ||
range => '6.7.0.0/16', | ||
} | ||
] | ||
}, | ||
region => <%= example_resource_name('some-region') -%>, | ||
project => $project, # e.g. 'my-test-project' | ||
credential => 'mycred', | ||
} |
Oops, something went wrong.