Skip to content

Commit

Permalink
cdktf: translate all docs and use app-based workflow (hashicorp#32724)
Browse files Browse the repository at this point in the history
* cdktf: translate all docs for cdktf

* cdktf: use app token workflow

* cdktf: translate all documentation to python and typescript

* cdktf: exclude guides from translated docs

---------

Co-authored-by: team-tf-cdk <[email protected]>
  • Loading branch information
DanielMSchmidt and team-tf-cdk authored Aug 3, 2023
1 parent bda0a0c commit 899e70d
Show file tree
Hide file tree
Showing 3,477 changed files with 379,650 additions and 1,568 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 17 additions & 2 deletions .github/workflows/cdktf-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,29 @@ permissions:
pull-requests: write

jobs:
generateToken:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.generate_token.outputs.token }}
steps:
- name: Generate Token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
with:
app_id: ${{ secrets.APP_ID }}
installation_id: ${{ secrets.INSTALLATION_ID }}
private_key: ${{secrets.APP_PEM }}

cdktfDocs:
needs:
- generateToken
uses: hashicorp/terraform-cdk/.github/workflows/registry-docs-pr-based.yml@304e2507209c9657135dc7b4b7ee68030327468f
secrets:
GH_PR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PR_TOKEN: ${{ needs.generateToken.outputs.token }}
with:
providerFqn: "hashicorp/aws"
files: "*/ec2*.html.markdown,*/lambda*.html.markdown,*/eks*.html.markdown,*/vpc*.html.markdown,*/instance.html.markdown"
languages: "typescript,python"
files: "d/*.html.markdown,r/*.html.markdown"
parallelFileConversions: 1
maxRunners: 20
cdktfRegistryDocsVersion: "1.14.2"
67 changes: 67 additions & 0 deletions website/docs/cdktf/python/d/acm_certificate.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
subcategory: "ACM (Certificate Manager)"
layout: "aws"
page_title: "AWS: aws_acm_certificate"
description: |-
Get information on a Amazon Certificate Manager (ACM) Certificate
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: aws_acm_certificate

Use this data source to get the ARN of a certificate in AWS Certificate
Manager (ACM), you can reference
it by domain without having to hard code the ARNs as input.

## Example Usage

```python
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.aws.data_aws_acm_certificate import DataAwsAcmCertificate
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataAwsAcmCertificate(self, "amazon_issued",
domain="tf.example.com",
most_recent=True,
types=["AMAZON_ISSUED"]
)
DataAwsAcmCertificate(self, "issued",
domain="tf.example.com",
statuses=["ISSUED"]
)
DataAwsAcmCertificate(self, "rsa_4096",
domain="tf.example.com",
key_types=["RSA_4096"]
)
```

## Argument Reference

* `domain` - (Required) Domain of the certificate to look up. If no certificate is found with this name, an error will be returned.
* `key_types` - (Optional) List of key algorithms to filter certificates. By default, ACM does not return all certificate types when searching. See the [ACM API Reference](https://docs.aws.amazon.com/acm/latest/APIReference/API_CertificateDetail.html#ACM-Type-CertificateDetail-KeyAlgorithm) for supported key algorithms.
* `statuses` - (Optional) List of statuses on which to filter the returned list. Valid values are `PENDING_VALIDATION`, `ISSUED`,
`INACTIVE`, `EXPIRED`, `VALIDATION_TIMED_OUT`, `REVOKED` and `FAILED`. If no value is specified, only certificates in the `ISSUED` state
are returned.
* `types` - (Optional) List of types on which to filter the returned list. Valid values are `AMAZON_ISSUED`, `PRIVATE`, and `IMPORTED`.
* `most_recent` - (Optional) If set to true, it sorts the certificates matched by previous criteria by the NotBefore field, returning only the most recent one. If set to false, it returns an error if more than one certificate is found. Defaults to false.

## Attribute Reference

This data source exports the following attributes in addition to the arguments above:

* `arn` - ARN of the found certificate, suitable for referencing in other resources that support ACM certificates.
* `id` - ARN of the found certificate, suitable for referencing in other resources that support ACM certificates.
* `status` - Status of the found certificate.
* `certificate` - ACM-issued certificate.
* `certificate_chain` - Certificates forming the requested ACM-issued certificate's chain of trust. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs.
* `tags` - Mapping of tags for the resource.

<!-- cache-key: cdktf-0.17.1 input-0827f19734f2b9d26e0cb7f069a9c6094d49e933890f68cd0c6364c65af42e86 -->
49 changes: 49 additions & 0 deletions website/docs/cdktf/python/d/acmpca_certificate.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
subcategory: "ACM PCA (Certificate Manager Private Certificate Authority)"
layout: "aws"
page_title: "AWS: aws_acmpca_certificate"
description: |-
Get information on a Certificate issued by a AWS Certificate Manager Private Certificate Authority
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: aws_acmpca_certificate

Get information on a Certificate issued by a AWS Certificate Manager Private Certificate Authority.

## Example Usage

```python
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.aws.data_aws_acmpca_certificate import DataAwsAcmpcaCertificate
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataAwsAcmpcaCertificate(self, "example",
arn="arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/1234b4a0d73e2056789bdbe77d5b1a23",
certificate_authority_arn="arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012"
)
```

## Argument Reference

This data source supports the following arguments:

* `arn` - (Required) ARN of the certificate issued by the private certificate authority.
* `certificate_authority_arn` - (Required) ARN of the certificate authority.

## Attribute Reference

This data source exports the following attributes in addition to the arguments above:

* `certificate` - PEM-encoded certificate value.
* `certificate_chain` - PEM-encoded certificate chain that includes any intermediate certificates and chains up to root CA.

<!-- cache-key: cdktf-0.17.1 input-f7804d061124fc6489bcc7d11d155c5a561ad1fe6aac3da7e0bdce8a5bdbf606 -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
subcategory: "ACM PCA (Certificate Manager Private Certificate Authority)"
layout: "aws"
page_title: "AWS: aws_acmpca_certificate_authority"
description: |-
Get information on a AWS Certificate Manager Private Certificate Authority
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: aws_acmpca_certificate_authority

Get information on a AWS Certificate Manager Private Certificate Authority (ACM PCA Certificate Authority).

## Example Usage

```python
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.aws.data_aws_acmpca_certificate_authority import DataAwsAcmpcaCertificateAuthority
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataAwsAcmpcaCertificateAuthority(self, "example",
arn="arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012"
)
```

## Argument Reference

This data source supports the following arguments:

* `arn` - (Required) ARN of the certificate authority.

## Attribute Reference

This data source exports the following attributes in addition to the arguments above:

* `id` - ARN of the certificate authority.
* `certificate` - Base64-encoded certificate authority (CA) certificate. Only available after the certificate authority certificate has been imported.
* `certificate_chain` - Base64-encoded certificate chain that includes any intermediate certificates and chains up to root on-premises certificate that you used to sign your private CA certificate. The chain does not include your private CA certificate. Only available after the certificate authority certificate has been imported.
* `certificate_signing_request` - The base64 PEM-encoded certificate signing request (CSR) for your private CA certificate.
* `usage_mode` - Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or short-lived certificates that may optionally omit revocation because they expire quickly.
* `not_after` - Date and time after which the certificate authority is not valid. Only available after the certificate authority certificate has been imported.
* `not_before` - Date and time before which the certificate authority is not valid. Only available after the certificate authority certificate has been imported.
* `revocation_configuration` - Nested attribute containing revocation configuration.
* `revocation_configuration.0.crl_configuration` - Nested attribute containing configuration of the certificate revocation list (CRL), if any, maintained by the certificate authority.
* `revocation_configuration.0.crl_configuration.0.custom_cname` - Name inserted into the certificate CRL Distribution Points extension that enables the use of an alias for the CRL distribution point.
* `revocation_configuration.0.crl_configuration.0.enabled` - Boolean value that specifies whether certificate revocation lists (CRLs) are enabled.
* `revocation_configuration.0.crl_configuration.0.expiration_in_days` - Number of days until a certificate expires.
* `revocation_configuration.0.crl_configuration.0.s3_bucket_name` - Name of the S3 bucket that contains the CRL.
* `revocation_configuration.0.crl_configuration.0.s3_object_acl` - Whether the CRL is publicly readable or privately held in the CRL Amazon S3 bucket.
* `revocation_configuration.0.ocsp_configuration.0.enabled` - Boolean value that specifies whether a custom OCSP responder is enabled.
* `revocation_configuration.0.ocsp_configuration.0.ocsp_custom_cname` - A CNAME specifying a customized OCSP domain.
* `serial` - Serial number of the certificate authority. Only available after the certificate authority certificate has been imported.
* `status` - Status of the certificate authority.
* `tags` - Key-value map of user-defined tags that are attached to the certificate authority.
* `type` - Type of the certificate authority.

<!-- cache-key: cdktf-0.17.1 input-bc455641e95958e404dd0619abf86e9d1dc1b0604b9b489c29ed39db56a62037 -->
142 changes: 142 additions & 0 deletions website/docs/cdktf/python/d/ami.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
subcategory: "EC2 (Elastic Compute Cloud)"
layout: "aws"
page_title: "AWS: aws_ami"
description: |-
Get information on an Amazon Machine Image (AMI).
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: aws_ami

Use this data source to get the ID of a registered AMI for use in other
resources.

## Example Usage

```terraform
data "aws_ami" "example" {
executable_users = ["self"]
most_recent = true
name_regex = "^myami-\\d{3}"
owners = ["self"]
filter {
name = "name"
values = ["myami-*"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}
```

## Argument Reference

* `owners` - (Optional) List of AMI owners to limit search. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g., `amazon`, `aws-marketplace`, `microsoft`).

* `most_recent` - (Optional) If more than one result is returned, use the most
recent AMI.

* `executable_users` - (Optional) Limit search to users with *explicit* launch permission on
the image. Valid items are the numeric account ID or `self`.

* `include_deprecated` - (Optional) If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.

* `filter` - (Optional) One or more name/value pairs to filter off of. There are
several valid keys, for a full reference, check out
[describe-images in the AWS CLI reference][1].

* `name_regex` - (Optional) Regex string to apply to the AMI list returned
by AWS. This allows more advanced filtering not supported from the AWS API. This
filtering is done locally on what AWS returns, and could have a performance
impact if the result is large. Combine this with other
options to narrow down the list AWS returns.

~> **NOTE:** If more or less than a single match is returned by the search,
Terraform will fail. Ensure that your search is specific enough to return
a single AMI ID only, or use `most_recent` to choose the most recent one. If
you want to match multiple AMIs, use the `aws_ami_ids` data source instead.

## Attribute Reference

`id` is set to the ID of the found AMI. In addition, the following attributes
are exported:

~> **NOTE:** Some values are not always set and may not be available for
interpolation.

* `arn` - ARN of the AMI.
* `architecture` - OS architecture of the AMI (ie: `i386` or `x86_64`).
* `boot_mode` - Boot mode of the image.
* `block_device_mappings` - Set of objects with block device mappings of the AMI.
* `device_name` - Physical name of the device.
* `ebs` - Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g., `ebs.volume_size` or `ebs["volume_size"]`) rather than accessed through the first element of a list (e.g., `ebs[0].volume_size`).
* `delete_on_termination` - `true` if the EBS volume will be deleted on termination.
* `encrypted` - `true` if the EBS volume is encrypted.
* `iops` - `0` if the EBS volume is not a provisioned IOPS image, otherwise the supported IOPS count.
* `snapshot_id` - The ID of the snapshot.
* `volume_size` - The size of the volume, in GiB.
* `throughput` - The throughput that the EBS volume supports, in MiB/s.
* `volume_type` - The volume type.
* `no_device` - Suppresses the specified device included in the block device mapping of the AMI.
* `virtual_name` - Virtual device name (for instance stores).
* `creation_date` - Date and time the image was created.
* `deprecation_time` - Date and time when the image will be deprecated.
* `description` - Description of the AMI that was provided during image
creation.
* `hypervisor` - Hypervisor type of the image.
* `image_id` - ID of the AMI. Should be the same as the resource `id`.
* `image_location` - Location of the AMI.
* `image_owner_alias` - AWS account alias (for example, `amazon`, `self`) or
the AWS account ID of the AMI owner.
* `image_type` - Type of image.
* `imds_support` - Instance Metadata Service (IMDS) support mode for the image. Set to `v2.0` if instances ran from this image enforce IMDSv2.
* `kernel_id` - Kernel associated with the image, if any. Only applicable
for machine images.
* `name` - Name of the AMI that was provided during image creation.
* `owner_id` - AWS account ID of the image owner.
* `platform` - Value is Windows for `Windows` AMIs; otherwise blank.
* `product_codes` - Any product codes associated with the AMI.
* `product_codes.#.product_code_id` - The product code.
* `product_codes.#.product_code_type` - The type of product code.
* `public` - `true` if the image has public launch permissions.
* `ramdisk_id` - RAM disk associated with the image, if any. Only applicable
for machine images.
* `root_device_name` - Device name of the root device.
* `root_device_type` - Type of root device (ie: `ebs` or `instance-store`).
* `root_snapshot_id` - Snapshot id associated with the root device, if any
(only applies to `ebs` root devices).
* `sriov_net_support` - Whether enhanced networking is enabled.
* `state` - Current state of the AMI. If the state is `available`, the image
is successfully registered and can be used to launch an instance.
* `state_reason` - Describes a state change. Fields are `UNSET` if not available.
* `state_reason.code` - The reason code for the state change.
* `state_reason.message` - The message for the state change.
* `tags` - Any tags assigned to the image.
* `tags.#.key` - Key name of the tag.
* `tags.#.value` - Value of the tag.
* `tpm_support` - If the image is configured for NitroTPM support, the value is `v2.0`.
* `virtualization_type` - Type of virtualization of the AMI (ie: `hvm` or
`paravirtual`).
* `usage_operation` - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
* `platform_details` - Platform details associated with the billing code of the AMI.
* `ena_support` - Whether enhanced networking with ENA is enabled.

## Timeouts

[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts):

- `read` - (Default `20m`)

[1]: http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html

<!-- cache-key: cdktf-0.17.1 input-b27379b47e46b092af0eb0d0592f4690caa729d66535c1d3f2706e8aa24bff38 -->
Loading

0 comments on commit 899e70d

Please sign in to comment.