mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-29 16:11:31 -07:00
This commit is contained in:
parent
8b9a2c70dd
commit
2b35fbf404
3 changed files with 48 additions and 8 deletions
|
@ -21,6 +21,13 @@
|
|||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
state: present
|
||||
register: topic
|
||||
- name: Create a bucket
|
||||
google.cloud.gcp_storage_bucket:
|
||||
name: topic-subscription-bucket
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
state: present
|
||||
- name: Delete a subscription
|
||||
google.cloud.gcp_pubsub_subscription:
|
||||
name: "{{ resource_name }}"
|
||||
|
@ -73,11 +80,20 @@
|
|||
that:
|
||||
- result.changed == false
|
||||
#----------------------------------------------------------
|
||||
- name: Update ack_deadline_seconds of a subscription that already exists
|
||||
- name: Update cloudStorageConfig of a subscription that already exists
|
||||
google.cloud.gcp_pubsub_subscription:
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
ack_deadline_seconds: 500
|
||||
ack_deadline_seconds: 300
|
||||
cloud_storage: {
|
||||
bucket: "topic-subscription-bucket",
|
||||
file_prefix: "test_",
|
||||
file_suffix: "_test",
|
||||
max_bytes: 10737418240,
|
||||
max_duration: "600s",
|
||||
output_format: "avro",
|
||||
write_metadata: true
|
||||
}
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
|
@ -92,7 +108,7 @@
|
|||
google.cloud.gcp_pubsub_subscription:
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
ack_deadline_seconds: 500
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
|
@ -119,7 +135,7 @@
|
|||
google.cloud.gcp_pubsub_subscription:
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
ack_deadline_seconds: 500
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
|
@ -141,3 +157,11 @@
|
|||
state: absent
|
||||
register: topic
|
||||
ignore_errors: true
|
||||
|
||||
- name: Delete a bucket
|
||||
google.cloud.gcp_storage_bucket:
|
||||
name: topic-subscription-bucket
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file | default(omit) }}"
|
||||
state: absent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue