<commit_before># Copyright 2017 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::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
  Topic: !ruby/object:Overrides::Terraform::ResourceOverride
    # PubSub resources don't have operations but are negatively cached
    # and eventually consistent.
    # Because some users check whether the PubSub resource exists prior
    # to applying a new resource, we need to add this PollAsync to GET the
    # resource until it exists and the negative cached result goes away.
    # Context: hashicorp/terraform-provider-google#4993
    async: !ruby/object:Provider::Terraform::PollAsync
      check_response_func_existence: PollCheckForExistence
      actions: ['create']
      operation: !ruby/object:Api::Async::Operation
        timeouts: !ruby/object:Api::Timeouts
          insert_minutes: 6
          update_minutes: 6
          delete_minutes: 4
      suppress_error: true
    error_retry_predicates: ["pubsubTopicProjectNotReady"]
    iam_policy: !ruby/object:Api::Resource::IamPolicy
      parent_resource_attribute: 'topic'
      method_name_separator: ':'
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_basic"
        primary_resource_id: "example"
        primary_resource_name: "fmt.Sprintf(\"tf-test-example-topic%s\", context[\"random_suffix\"])"
        vars:
          topic_name: "example-topic"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_cmek"
        primary_resource_id: "example"
        skip_test: true
        vars:
          topic_name: "example-topic"
          key_name: "example-key"
          keyring_name: "example-keyring"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_geo_restricted"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
    properties:
      name: !ruby/object:Overrides::Terraform::PropertyOverride
        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
  Subscription: !ruby/object:Overrides::Terraform::ResourceOverride
    # PubSub resources don't have operations but are negatively cached
    # and eventually consistent.
    # Because some users check whether the PubSub resource exists prior
    # to applying a new resource, we need to add this PollAsync to GET the
    # resource until it exists and the negative cached result goes away.
    # Context: hashicorp/terraform-provider-google#4993
    async: !ruby/object:Provider::Terraform::PollAsync
      check_response_func_existence: PollCheckForExistence
      actions: ['create']
      operation: !ruby/object:Api::Async::Operation
        timeouts: !ruby/object:Api::Timeouts
          insert_minutes: 6
          update_minutes: 6
          delete_minutes: 4
      suppress_error: true
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_push"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_pull"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_different_project"
        primary_resource_id: "example"
        skip_test: true
        vars:
          topic_name: "example-topic"
          topic_project: "topic-project"
          subscription_name: "example-subscription"
          subscription_project: "subscription-project"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_dead_letter"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
    docs: !ruby/object:Provider::Terraform::Docs
      attributes: |
        * `path`: Path of the subscription in the format `projects/{project}/subscriptions/{name}`
    properties:
      name: !ruby/object:Overrides::Terraform::PropertyOverride
        custom_expand: templates/terraform/custom_expand/shortname_to_url.go.erb
        custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
      topic: !ruby/object:Overrides::Terraform::PropertyOverride
        diff_suppress_func: 'compareSelfLinkOrResourceName'
        custom_expand: templates/terraform/custom_expand/computed_subscription_topic.erb
      ackDeadlineSeconds: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      expirationPolicy: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      expirationPolicy.ttl: !ruby/object:Overrides::Terraform::PropertyOverride<commit_msg>Add a note about Pubsub project service identity (#4225)<commit_after># Copyright 2017 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::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
  Topic: !ruby/object:Overrides::Terraform::ResourceOverride
    docs: !ruby/object:Provider::Terraform::Docs
      note: |
        You can retrieve the email of the Google Managed Pub/Sub Service Account used for forwarding 
        by using the `google_project_service_identity` resource.
    # PubSub resources don't have operations but are negatively cached
    # and eventually consistent.
    # Because some users check whether the PubSub resource exists prior
    # to applying a new resource, we need to add this PollAsync to GET the
    # resource until it exists and the negative cached result goes away.
    # Context: hashicorp/terraform-provider-google#4993
    async: !ruby/object:Provider::Terraform::PollAsync
      check_response_func_existence: PollCheckForExistence
      actions: ['create']
      operation: !ruby/object:Api::Async::Operation
        timeouts: !ruby/object:Api::Timeouts
          insert_minutes: 6
          update_minutes: 6
          delete_minutes: 4
      suppress_error: true
    error_retry_predicates: ["pubsubTopicProjectNotReady"]
    iam_policy: !ruby/object:Api::Resource::IamPolicy
      parent_resource_attribute: 'topic'
      method_name_separator: ':'
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_basic"
        primary_resource_id: "example"
        primary_resource_name: "fmt.Sprintf(\"tf-test-example-topic%s\", context[\"random_suffix\"])"
        vars:
          topic_name: "example-topic"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_cmek"
        primary_resource_id: "example"
        skip_test: true
        vars:
          topic_name: "example-topic"
          key_name: "example-key"
          keyring_name: "example-keyring"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_topic_geo_restricted"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
    properties:
      name: !ruby/object:Overrides::Terraform::PropertyOverride
        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
  Subscription: !ruby/object:Overrides::Terraform::ResourceOverride
    # PubSub resources don't have operations but are negatively cached
    # and eventually consistent.
    # Because some users check whether the PubSub resource exists prior
    # to applying a new resource, we need to add this PollAsync to GET the
    # resource until it exists and the negative cached result goes away.
    # Context: hashicorp/terraform-provider-google#4993
    async: !ruby/object:Provider::Terraform::PollAsync
      check_response_func_existence: PollCheckForExistence
      actions: ['create']
      operation: !ruby/object:Api::Async::Operation
        timeouts: !ruby/object:Api::Timeouts
          insert_minutes: 6
          update_minutes: 6
          delete_minutes: 4
      suppress_error: true
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_push"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_pull"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_different_project"
        primary_resource_id: "example"
        skip_test: true
        vars:
          topic_name: "example-topic"
          topic_project: "topic-project"
          subscription_name: "example-subscription"
          subscription_project: "subscription-project"
      - !ruby/object:Provider::Terraform::Examples
        name: "pubsub_subscription_dead_letter"
        primary_resource_id: "example"
        vars:
          topic_name: "example-topic"
          subscription_name: "example-subscription"
    docs: !ruby/object:Provider::Terraform::Docs
      attributes: |
        * `path`: Path of the subscription in the format `projects/{project}/subscriptions/{name}`
      note: |
        You can retrieve the email of the Google Managed Pub/Sub Service Account used for forwarding 
        by using the `google_project_service_identity` resource.
    properties:
      name: !ruby/object:Overrides::Terraform::PropertyOverride
        custom_expand: templates/terraform/custom_expand/shortname_to_url.go.erb
        custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
      topic: !ruby/object:Overrides::Terraform::PropertyOverride
        diff_suppress_func: 'compareSelfLinkOrResourceName'
        custom_expand: templates/terraform/custom_expand/computed_subscription_topic.erb
      ackDeadlineSeconds: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      expirationPolicy: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      expirationPolicy.ttl: !ruby/object:Overrides::Terraform::PropertyOverride
{'fraction_non_alphanumeric': 0.0861247947454844, 'fraction_numerical': 0.003940886699507389, 'mean_word_length': 3.5553477935676887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6621433', 'n_tokens_mistral': 3469, 'n_tokens_neox': 3396, 'n_words': 783}