Skip to content

Commit

Permalink
cdktf: update index.md,resources/file.md,data-sources/file.md (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
team-tf-cdk authored Nov 25, 2024
1 parent 52fc728 commit 7cf8053
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 22 deletions.
6 changes: 3 additions & 3 deletions docs/cdktf/python/data-sources/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
page_title: "archive_file Data Source - terraform-provider-archive"
subcategory: ""
description: |-
Generates an archive from content, a file, or directory of files.
Generates an archive from content, a file, or directory of files. The archive is built during the terraform plan, so you must persist the archive through to the terraform apply. See the archive_file resource for an alternative if you cannot persist the file, such as in a multi-phase CI or build server context.
---


<!-- Please do not edit this file, it is generated. -->
# archive_file (Data Source)

Generates an archive from content, a file, or directory of files.
Generates an archive from content, a file, or directory of files. The archive is built during the terraform plan, so you must persist the archive through to the terraform apply. See the `archive_file` resource for an alternative if you cannot persist the file, such as in a multi-phase CI or build server context.

## Example Usage

Expand Down Expand Up @@ -117,4 +117,4 @@ Required:
- `content` (String) Add this content to the archive with `filename` as the filename.
- `filename` (String) Set this as the filename when declaring a `source`.

<!-- cache-key: cdktf-0.20.8 input-e028531bc97a019f848b3e37c5dde395799324b83b8cd5ea78649ffc9177c542 -->
<!-- cache-key: cdktf-0.20.8 input-58f16fa5c1a288eadc3103ca8daf35401729e7a632b0a84dc82a5c5d959b0602 -->
81 changes: 73 additions & 8 deletions docs/cdktf/python/resources/file.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,83 @@
---

<!-- Please do not edit this file, it is generated. -->
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "archive_file Resource - terraform-provider-archive"
subcategory: ""
description: |-
NOTE: This resource is deprecated, use data source instead.
Generates an archive from content, a file, or directory of files.
---

# archive_file (Resource)

**NOTE**: This resource is deprecated, use data source instead.

<!-- Please do not edit this file, it is generated. -->
# archive_file (Resource)

Generates an archive from content, a file, or directory of files.

## Example Usage

```python
# DO NOT EDIT. 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.archive.file import File
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
File(self, "init",
output_path="${path.module}/files/init.zip",
source_file="${path.module}/init.tpl",
type="zip"
)
```

```python
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import Token, TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.archive.file import File
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
File(self, "dotfiles",
excludes=["${path.module}/unwanted.zip"],
output_path="${path.module}/files/dotfiles.zip",
source=[FileSource(
content=Token.as_string(vimrc.rendered),
filename=".vimrc"
), FileSource(
content=Token.as_string(ssh_config.rendered),
filename=".ssh/config"
)
],
type="zip"
)
```

```python
# DO NOT EDIT. 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.archive.file import File
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
File(self, "lambda_my_function",
output_file_mode="0666",
output_path="${path.module}/files/lambda-my-function.js.zip",
source_file="${path.module}/../lambda/my-function/index.js",
type="zip"
)
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -52,4 +117,4 @@ Required:
- `content` (String) Add this content to the archive with `filename` as the filename.
- `filename` (String) Set this as the filename when declaring a `source`.

<!-- cache-key: cdktf-0.20.8 input-7fe48dc31101cb76c685aed0cf23657f6683fb390d9633ac73c1b06d4d3bedca -->
<!-- cache-key: cdktf-0.20.8 input-46508f720325fcf13d4a50acef1fde81a72282d7fe681248eae9aa7318fad025 -->
6 changes: 3 additions & 3 deletions docs/cdktf/typescript/data-sources/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
page_title: "archive_file Data Source - terraform-provider-archive"
subcategory: ""
description: |-
Generates an archive from content, a file, or directory of files.
Generates an archive from content, a file, or directory of files. The archive is built during the terraform plan, so you must persist the archive through to the terraform apply. See the archive_file resource for an alternative if you cannot persist the file, such as in a multi-phase CI or build server context.
---


<!-- Please do not edit this file, it is generated. -->
# archive_file (Data Source)

Generates an archive from content, a file, or directory of files.
Generates an archive from content, a file, or directory of files. The archive is built during the terraform plan, so you must persist the archive through to the terraform apply. See the `archive_file` resource for an alternative if you cannot persist the file, such as in a multi-phase CI or build server context.

## Example Usage

Expand Down Expand Up @@ -128,4 +128,4 @@ Required:
- `content` (String) Add this content to the archive with `filename` as the filename.
- `filename` (String) Set this as the filename when declaring a `source`.

<!-- cache-key: cdktf-0.20.8 input-e028531bc97a019f848b3e37c5dde395799324b83b8cd5ea78649ffc9177c542 -->
<!-- cache-key: cdktf-0.20.8 input-58f16fa5c1a288eadc3103ca8daf35401729e7a632b0a84dc82a5c5d959b0602 -->
92 changes: 84 additions & 8 deletions docs/cdktf/typescript/resources/file.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,94 @@
---

<!-- Please do not edit this file, it is generated. -->
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "archive_file Resource - terraform-provider-archive"
subcategory: ""
description: |-
NOTE: This resource is deprecated, use data source instead.
Generates an archive from content, a file, or directory of files.
---

# archive_file (Resource)

**NOTE**: This resource is deprecated, use data source instead.

<!-- Please do not edit this file, it is generated. -->
# archive_file (Resource)

Generates an archive from content, a file, or directory of files.

## Example Usage

```typescript
// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { TerraformStack } from "cdktf";
/*
* Provider bindings are generated by running `cdktf get`.
* See https://cdk.tf/provider-generation for more details.
*/
import { File } from "./.gen/providers/archive/file";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new File(this, "init", {
outputPath: "${path.module}/files/init.zip",
sourceFile: "${path.module}/init.tpl",
type: "zip",
});
}
}

```

```typescript
// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { Token, TerraformStack } from "cdktf";
/*
* Provider bindings are generated by running `cdktf get`.
* See https://cdk.tf/provider-generation for more details.
*/
import { File } from "./.gen/providers/archive/file";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new File(this, "dotfiles", {
excludes: ["${path.module}/unwanted.zip"],
outputPath: "${path.module}/files/dotfiles.zip",
source: [
{
content: Token.asString(vimrc.rendered),
filename: ".vimrc",
},
{
content: Token.asString(sshConfig.rendered),
filename: ".ssh/config",
},
],
type: "zip",
});
}
}

```

```typescript
// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { TerraformStack } from "cdktf";
/*
* Provider bindings are generated by running `cdktf get`.
* See https://cdk.tf/provider-generation for more details.
*/
import { File } from "./.gen/providers/archive/file";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new File(this, "lambda_my_function", {
outputFileMode: "0666",
outputPath: "${path.module}/files/lambda-my-function.js.zip",
sourceFile: "${path.module}/../lambda/my-function/index.js",
type: "zip",
});
}
}

```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -52,4 +128,4 @@ Required:
- `content` (String) Add this content to the archive with `filename` as the filename.
- `filename` (String) Set this as the filename when declaring a `source`.

<!-- cache-key: cdktf-0.20.8 input-7fe48dc31101cb76c685aed0cf23657f6683fb390d9633ac73c1b06d4d3bedca -->
<!-- cache-key: cdktf-0.20.8 input-46508f720325fcf13d4a50acef1fde81a72282d7fe681248eae9aa7318fad025 -->

0 comments on commit 7cf8053

Please sign in to comment.