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

Commit

Permalink
Minor schema/docs update to SslCertificate. (#89)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
  • Loading branch information
modular-magician authored and rambleraptor committed May 20, 2019
1 parent bda6617 commit e0392df
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 116 deletions.
145 changes: 71 additions & 74 deletions lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
---
module: gcp_compute_ssl_certificate
description:
- An SslCertificate resource, used for HTTPS load balancing. This resource provides
a mechanism to upload an SSL key and certificate to the load balancer to serve secure
connections from the user.
- An SslCertificate resource, used for HTTPS load balancing. This resource provides
a mechanism to upload an SSL key and certificate to the load balancer to serve secure
connections from the user.
short_description: Creates a GCP SslCertificate
version_added: 2.6
author: Google Inc. (@googlecloudplatform)
Expand All @@ -42,40 +42,38 @@
- requests >= 2.18.4
- google-auth >= 1.3.0
options:
state:
state:
description:
- Whether the given object should exist in GCP
choices: ['present', 'absent']
default: 'present'
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
required: true
description:
- Whether the given object should exist in GCP
choices:
- present
- absent
default: present
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
required: true
description:
description:
- An optional description of this resource.
required: false
name:
description:
- Name of the resource. Provided by the client when the resource is created. 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.
required: false
private_key:
description:
- The write-only private key in PEM format.
required: true
description:
- An optional description of this resource.
required: false
name:
description:
- Name of the resource. Provided by the client when the resource is created. 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.
required: false
private_key:
description:
- The write-only private key in PEM format.
required: true
extends_documentation_fragment: gcp
notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates)'
- 'Official Documentation: U(https://cloud.google.com/load-balancing/docs/ssl-certificates)'
- "API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates)"
- "Official Documentation: U(https://cloud.google.com/load-balancing/docs/ssl-certificates)"
'''

EXAMPLES = '''
Expand Down Expand Up @@ -114,43 +112,43 @@
'''

RETURN = '''
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
returned: success
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
description:
- Name of the resource. Provided by the client when the resource is created. 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.
returned: success
type: str
privateKey:
description:
- The write-only private key in PEM format.
returned: success
type: str
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
returned: success
type: str
creation_timestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
description:
- Name of the resource. Provided by the client when the resource is created. 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.
returned: success
type: str
private_key:
description:
- The write-only private key in PEM format.
returned: success
type: str
'''

################################################################################
Expand All @@ -175,7 +173,7 @@ def main():
certificate=dict(required=True, type='str'),
description=dict(type='str'),
name=dict(type='str'),
private_key=dict(required=True, type='str'),
private_key=dict(required=True, type='str')
)
)

Expand Down Expand Up @@ -216,8 +214,7 @@ def create(module, link, kind):


def update(module, link, kind):
delete(module, self_link(module), kind)
create(module, collection(module), kind)
module.fail_json(msg="SslCertificate cannot be edited")


def delete(module, link, kind):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,48 +59,48 @@
'''

RETURN = '''
resources:
description: List of resources
returned: always
type: complex
contains:
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
returned: success
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
description:
- Name of the resource. Provided by the client when the resource is created.
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.
returned: success
type: str
privateKey:
description:
- The write-only private key in PEM format.
returned: success
type: str
items:
description: List of items
returned: always
type: complex
contains:
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
returned: success
type: str
creation_timestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
description:
- Name of the resource. Provided by the client when the resource is created. 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.
returned: success
type: str
private_key:
description:
- The write-only private key in PEM format.
returned: success
type: str
'''

################################################################################
Expand Down

0 comments on commit e0392df

Please sign in to comment.