Skip to content

Commit

Permalink
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
GoogleWill committed Oct 28, 2019
2 parents 6b83487 + 8ba5798 commit 519dcbf
Show file tree
Hide file tree
Showing 74 changed files with 2,101 additions and 1,163 deletions.
66 changes: 66 additions & 0 deletions .ci/changelog.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{- $notes := newStringList -}}
{{- $unknown := newStringList -}}
{{- $breaking := newStringList -}}
{{- $deprecations := newStringList -}}
{{- $features := newStringList -}}
{{- $improvements := newStringList -}}
{{- $bugs := newStringList -}}
{{- range . -}}
{{if eq "note" .Type -}}
{{$notes = append $notes (renderReleaseNote .) -}}
{{else if eq "breaking-change" .Type -}}
{{$breaking = append $breaking (renderReleaseNote .) -}}
{{else if eq "deprecation" .Type -}}
{{$deprecations = append $deprecations (renderReleaseNote .) -}}
{{else if or (eq "new-resource" .Type) (eq "new-datasource" .Type) (eq "feature" .Type) -}}
{{$features = append $features (renderReleaseNote .) -}}
{{else if or (eq "improvement" .Type) (eq "enhancement" .Type) -}}
{{$improvements = append $improvements (renderReleaseNote .) -}}
{{ else if eq "bug" .Type -}}
{{$bugs = append $bugs (renderReleaseNote .) -}}
{{ else -}}
{{$unknown = append $unknown (renderReleaseNote .) -}}
{{end -}}
{{- end -}}
{{- if gt (len $unknown) 0 -}}
UNKNOWN CHANGELOG TYPE:
{{range $unknown | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $notes) 0 -}}
NOTES:
{{range $notes | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $deprecations) 0 -}}
DEPRECATIONS:
{{range $deprecations | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $breaking) 0 -}}
BREAKING CHANGES:
{{range $breaking | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $features) 0}}
FEATURES:
{{range $features | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $improvements) 0}}
IMPROVEMENTS:
{{range $improvements | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $bugs) 0}}
BUG FIXES:
{{range $bugs | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
15 changes: 8 additions & 7 deletions .ci/ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ jobs:
GITHUB_ORG: {{v.github_org}}
OVERRIDE_PROVIDER: {{v.override_provider}}

- task: test-{{v.short_name}}
file: magic-modules-branched/.ci/unit-tests/tf-3.yml
timeout: 30m
params:
PROVIDER_NAME: {{v.provider_name}}
TEST_DIR: {{v.test_dir}}

- put: {{v.short_name}}-intermediate
params:
repository: terraform-diff/{{k}}/new
Expand All @@ -206,6 +199,14 @@ jobs:
get_params:
skip_clone: true

- task: test-{{v.short_name}}
file: magic-modules-branched/.ci/unit-tests/tf-3.yml
timeout: 30m
params:
PROVIDER_NAME: {{v.provider_name}}
TEST_DIR: {{v.test_dir}}
SUBDIR: {{k}}

{% endfor %}

on_failure:
Expand Down
1 change: 1 addition & 0 deletions .ci/release-note.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{if eq "new-resource" .Type}}**New Resource:** {{else if eq "new-data-source" .Type}}**New Data Source:** {{ end }}{{.Text }} ([#{{- .PRNumber -}}]({{- .PRURL -}}))
2 changes: 1 addition & 1 deletion .ci/unit-tests/tf-3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -x

# Create GOPATH structure
mkdir -p "${GOPATH}/src/github.com/terraform-providers"
ln -s "${PWD}/terraform-diff/new" "${GOPATH}/src/github.com/terraform-providers/$PROVIDER_NAME"
ln -s "${PWD}/terraform-diff/${SUBDIR}/new" "${GOPATH}/src/github.com/terraform-providers/$PROVIDER_NAME"

cd "${GOPATH}/src/github.com/terraform-providers/$PROVIDER_NAME"

Expand Down
1 change: 1 addition & 0 deletions .ci/unit-tests/tf-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ run:
params:
PROVIDER_NAME: ""
TEST_DIR: ""
SUBDIR: ""
2 changes: 1 addition & 1 deletion build/ansible
2 changes: 1 addition & 1 deletion build/inspec
Submodule inspec updated 378 files
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
9 changes: 5 additions & 4 deletions products/appengine/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
examples:
- !ruby/object:Provider::Terraform::Examples
name: "app_engine_standard_app_version"
primary_resource_id: "version_id"
primary_resource_id: "myapp_v1"
ignore_read_extra:
- "noop_on_destroy"
- "delete_service_on_destroy"
vars:
project_id: "test-project"
bucket_name: "appengine-static-content"
Expand Down Expand Up @@ -93,6 +93,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
update_mask_fields:
- "ssl_settings.certificate_id"
- "ssl_settings.ssl_management_type"
sslSettings.certificateId: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
ApplicationUrlDispatchRules: !ruby/object:Overrides::Terraform::ResourceOverride
id_format: "{{project}}"
import_format: ["{{project}}"]
Expand All @@ -102,9 +104,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
examples:
- !ruby/object:Provider::Terraform::Examples
name: "app_engine_application_url_dispatch_rules_basic"
primary_resource_id: "service_rules"
primary_resource_id: "web_service"
vars:
project: "my-project"
bucket_name: "appengine-test-bucket"

# This is for copying files over
Expand Down
2 changes: 2 additions & 0 deletions products/cloudbuild/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ objects:
name: 'branchName'
description: |
Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided.
This field is a regular expression.
- !ruby/object:Api::Type::String
name: 'tagName'
description: |
Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided.
This field is a regular expression.
- !ruby/object:Api::Type::String
name: 'commitSha'
description: |
Expand Down
6 changes: 6 additions & 0 deletions products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5641,6 +5641,10 @@ objects:
path: 'name'
base_url: 'projects/{{project}}/zones/{{zone}}/operations/{{op_id}}'
wait_ms: 1000
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
result: !ruby/object:Api::Async::Result
path: 'targetLink'
status: !ruby/object:Api::Async::Status
Expand Down Expand Up @@ -7655,6 +7659,7 @@ objects:
name: bgp
description: |
BGP information specific to this router.
send_empty_value: true
properties:
- !ruby/object:Api::Type::Integer
name: asn
Expand Down Expand Up @@ -7720,6 +7725,7 @@ objects:
delete_verb: :PATCH
identity:
- name
collection_url_key: nats
nested_query: !ruby/object:Api::Resource::NestedQuery
modify_by_patch: true
keys:
Expand Down
2 changes: 0 additions & 2 deletions products/compute/inspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
exclude: true
ResourcePolicy: !ruby/object:Overrides::Inspec::ResourceOverride
exclude: true
RouterNat: !ruby/object:Overrides::Inspec::ResourceOverride
exclude: true
Subnetwork: !ruby/object:Overrides::Inspec::ResourceOverride
exclude_resource: true
iam_policy: !ruby/object:Api::Resource::IamPolicy
Expand Down
34 changes: 28 additions & 6 deletions products/pubsub/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,29 @@ objects:
configure it. An empty pushConfig signifies that the subscriber will
pull and ack messages using API methods.
properties:
- !ruby/object:Api::Type::NestedObject
name: 'oidcToken'
description: |
If specified, Pub/Sub will generate and attach an OIDC JWT token as
an Authorization header in the HTTP request for every pushed message.
properties:
- !ruby/object:Api::Type::String
name: 'serviceAccountEmail'
required: true
description: |
Service account email to be used for generating the OIDC token.
The caller (for subscriptions.create, subscriptions.patch, and
subscriptions.modifyPushConfig RPCs) must have the
iam.serviceAccounts.actAs permission for the service account.
- !ruby/object:Api::Type::String
name: 'audience'
description: |
Audience to be used when generating OIDC token. The audience claim
identifies the recipients that the JWT is intended for. The audience
value is a single case-sensitive string. Having multiple values (array)
for the audience field is not supported. More info about the OIDC JWT
token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
Note: if not specified, the Push endpoint URL will be used.
- !ruby/object:Api::Type::String
name: 'pushEndpoint'
description: |
Expand Down Expand Up @@ -209,16 +232,15 @@ objects:
A subscription is considered active as long as any connected subscriber
is successfully consuming messages from the subscription or is issuing
operations on the subscription. If expirationPolicy is not set, a default
policy with ttl of 31 days will be used. The minimum allowed value for
expirationPolicy.ttl is 1 day.
policy with ttl of 31 days will be used. If it is set but left empty, the
resource never expires. The minimum allowed value for expirationPolicy.ttl
is 1 day.
properties:
- !ruby/object:Api::Type::String
name: 'ttl'
description: |
Specifies the "time-to-live" duration for an associated resource. The
resource expires if it is not active for a period of ttl. The definition
of "activity" depends on the type of the associated resource. The minimum
and maximum allowed values for ttl depend on the type of the associated
resource, as well. If ttl is not set, the associated resource never expires.
resource expires if it is not active for a period of ttl.
If ttl is not set, the associated resource never expires.
A duration in seconds with up to nine fractional digits, terminated by 's'.
Example - "3.5s".
2 changes: 2 additions & 0 deletions products/pubsub/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
diff_suppress_func: 'compareSelfLinkOrResourceName'
custom_expand: templates/terraform/custom_expand/resource_from_self_link.go.erb
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
messageStoragePolicy: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
encoder: templates/terraform/encoders/no_send_name.go.erb
update_encoder: templates/terraform/update_encoder/pubsub_topic.erb
Expand Down
30 changes: 30 additions & 0 deletions products/runtimeconfig/ansible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2019 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::Config
datasources: !ruby/object:Overrides::ResourceOverrides
Config: !ruby/object:Overrides::Ansible::ResourceOverride
facts: !ruby/object:Provider::Ansible::FactsOverride
has_filters: false
Variable: !ruby/object:Overrides::Ansible::ResourceOverride
facts: !ruby/object:Provider::Ansible::FactsOverride
has_filters: false
overrides: !ruby/object:Overrides::ResourceOverrides
Variable: !ruby/object:Overrides::Ansible::ResourceOverride
provider_helpers:
- 'products/runtimeconfig/helpers/ansible/variable_delete_config.py'
transport: !ruby/object:Overrides::Ansible::Transport
encoder: encode_request
files: !ruby/object:Provider::Config::Files
resource:
<%= lines(indent(compile('provider/ansible/resource~compile.yaml'), 4)) -%>
23 changes: 23 additions & 0 deletions products/runtimeconfig/ansible_version_added.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
:facts:
:Config:
:version_added: '2.10'
:Variable:
:version_added: '2.10'
:regular:
:Config:
:version_added: '2.10'
:description:
:version_added: '2.10'
:name:
:version_added: '2.10'
:Variable:
:version_added: '2.10'
:value:
:version_added: '2.10'
:text:
:version_added: '2.10'
:name:
:version_added: '2.10'
:config:
:version_added: '2.10'
4 changes: 3 additions & 1 deletion products/runtimeconfig/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ objects:
The name of the runtime config.
required: true
input: true
pattern: projects/{{project}}/configs/{{name}}
properties:
- !ruby/object:Api::Type::String
name: 'description'
Expand All @@ -61,6 +62,7 @@ objects:
The name of the variable resource.
required: true
input: true
pattern: projects/{{project}}/configs/{{config}}/variables/{{name}}
- !ruby/object:Api::Type::String
name: 'config'
description: |
Expand All @@ -75,4 +77,4 @@ objects:
- !ruby/object:Api::Type::String
name: 'text'
description: |
The string value of the variable. Either this or `value` can be set.
The string value of the variable. Either this or `value` can be set.
21 changes: 21 additions & 0 deletions products/runtimeconfig/examples/ansible/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2019 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
task: !ruby/object:Provider::Ansible::Task
name: gcp_runtimeconfig_config
code:
name: <%= ctx[:name] %>
description: 'My config'
project: <%= ctx[:project] %>
auth_kind: <%= ctx[:auth_kind] %>
service_account_file: <%= ctx[:service_account_file] %>
Loading

0 comments on commit 519dcbf

Please sign in to comment.