Skip to content

Commit

Permalink
Merge branch 'main' into 361_exclude_symlink_directories_skips_other_…
Browse files Browse the repository at this point in the history
…dirs
  • Loading branch information
metmikel authored Nov 27, 2024
2 parents 1fabd4f + 7cf8053 commit 244cff9
Show file tree
Hide file tree
Showing 26 changed files with 396 additions and 151 deletions.
5 changes: 5 additions & 0 deletions .changes/unreleased/FEATURES-20240912-140136.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: FEATURES
body: 'resource/archive_file: Remove `deprecated` status'
time: 2024-09-12T14:01:36.373922-04:00
custom:
Issue: "218"
2 changes: 1 addition & 1 deletion .github/workflows/ci-changie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Ensure terraform-devex-repos is updated on version changes.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Ensure terraform-devex-repos is updated on version changes.
- uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- run: copywrite headers --plan
- run: copywrite license --plan
2 changes: 1 addition & 1 deletion .github/workflows/issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
issue_triage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
configuration-path: .github/labeler-pull-request-triage.yml
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: CodelyTV/pr-size-labeler@56f6f0fc35c7cc0f72963b8467729e1120cb4bed # v1.10.0
- uses: CodelyTV/pr-size-labeler@c7a55a022747628b50f3eb5bf863b9e796b8f274 # v1.10.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/XS'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Avoid persisting GITHUB_TOKEN credentials as they take priority over our service account PAT for `git push` operations
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job,
Expand All @@ -79,7 +79,7 @@ jobs:
needs: [ changelog-version, changelog, release-tag ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.versionNumber }}
fetch-depth: 0
Expand All @@ -89,7 +89,7 @@ jobs:
cd .changes
sed -e "1{/# /d;}" -e "2{/^$/d;}" ${{ needs.changelog-version.outputs.version }}.md > release-notes.txt
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: release-notes
path: ./.changes/release-notes.txt
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
id: go

- name: Run linters
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: latest

# We need the latest version of Terraform for our documentation generation to use
- name: Set up Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_wrapper: false

- name: Generate
run: make generate

Expand Down Expand Up @@ -62,10 +68,10 @@ jobs:
steps:

- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
check-latest: true
Expand Down
6 changes: 3 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Archive Provider Design

The Archive Provider offers focussed functionality specifically geared towards archiving files. Specifically,
the provider data source generates zip archives of individual or multiple files.
The Archive Provider offers focussed functionality specifically geared towards archiving files. The provider generates
zip archives of individual or multiple files.

Below we have a collection of _Goals_ and _Patterns_: they represent the guiding principles applied during the
development of this provider. Some are in place, others are ongoing processes, others are still just inspirational.

## Goals

* [_Stability over features_](.github/CONTRIBUTING.md)
* Provide data source for generating zip archives.
* Provide a mechanism for generating zip archives.

General to development:

Expand Down
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.1 input-e028531bc97a019f848b3e37c5dde395799324b83b8cd5ea78649ffc9177c542 -->
<!-- cache-key: cdktf-0.20.8 input-58f16fa5c1a288eadc3103ca8daf35401729e7a632b0a84dc82a5c5d959b0602 -->
2 changes: 1 addition & 1 deletion docs/cdktf/python/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The archive provider exposes resources to manage archive files.

This provider requires no configuration. For information on the resources
it provides, see the navigation bar.
<!-- cache-key: cdktf-0.20.1 input-29729bd5dcf423357d35fb88a589120ee1e2d5d1677702061afe3d70700dddc8 -->
<!-- cache-key: cdktf-0.20.8 input-29729bd5dcf423357d35fb88a589120ee1e2d5d1677702061afe3d70700dddc8 -->
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.1 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.1 input-e028531bc97a019f848b3e37c5dde395799324b83b8cd5ea78649ffc9177c542 -->
<!-- cache-key: cdktf-0.20.8 input-58f16fa5c1a288eadc3103ca8daf35401729e7a632b0a84dc82a5c5d959b0602 -->
2 changes: 1 addition & 1 deletion docs/cdktf/typescript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The archive provider exposes resources to manage archive files.

This provider requires no configuration. For information on the resources
it provides, see the navigation bar.
<!-- cache-key: cdktf-0.20.1 input-29729bd5dcf423357d35fb88a589120ee1e2d5d1677702061afe3d70700dddc8 -->
<!-- cache-key: cdktf-0.20.8 input-29729bd5dcf423357d35fb88a589120ee1e2d5d1677702061afe3d70700dddc8 -->
Loading

0 comments on commit 244cff9

Please sign in to comment.