-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove
archive_file
resource deprecated status (#367)
* feat: remove `archive_file` resource deprecation notice - from what i gathered from the git history, this resource was introduced in `v2.3.0` in a deprecated state - discussion with the community involving @bendbennett resulted in the consideration of this deprecation being removed (see: #218) - since `v2.x` there has been a strong focus on keeping this provider limited to the `data` source, so some of this proposed change is taking a best guess at what makes sense while trying not to depart from the overall approach - i acknowledge that this appears to be in some ways orthogonal to the goal of the project, but there has been little movement in regards to this widely-requested feature (understandably so, based on reasons mentioned above). - there are cases, primarily in a remote build server context, where the design decisions/limitations of the `data` source makes the adoption and usage of this provider much more challenging. this change is proposed as a stop-gap until a larger focus is able to put on this project by the primary contributing team * docs: notes for `archive_file` `resource` versus `data` source * docs: changie release notes for #218 * docs: changie formatting Co-authored-by: Selena Goods <[email protected]> --------- Co-authored-by: Selena Goods <[email protected]>
- Loading branch information
Showing
10 changed files
with
110 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Archive a file to be used with Lambda using consistent file mode | ||
|
||
resource "archive_file" "lambda_my_function" { | ||
type = "zip" | ||
source_file = "${path.module}/../lambda/my-function/index.js" | ||
output_file_mode = "0666" | ||
output_path = "${path.module}/files/lambda-my-function.js.zip" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Archive multiple files and exclude file. | ||
|
||
resource "archive_file" "dotfiles" { | ||
type = "zip" | ||
output_path = "${path.module}/files/dotfiles.zip" | ||
excludes = ["${path.module}/unwanted.zip"] | ||
|
||
source { | ||
content = data.template_file.vimrc.rendered | ||
filename = ".vimrc" | ||
} | ||
|
||
source { | ||
content = data.template_file.ssh_config.rendered | ||
filename = ".ssh/config" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Archive a single file. | ||
|
||
resource "archive_file" "init" { | ||
type = "zip" | ||
source_file = "${path.module}/init.tpl" | ||
output_path = "${path.module}/files/init.zip" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | trimspace }} | ||
|
||
## Example Usage | ||
|
||
{{ tffile "examples/resources/file/resource.tf" }} | ||
|
||
{{ tffile "examples/resources/file/multiple-files.tf" }} | ||
|
||
{{ tffile "examples/resources/file/lambda.tf" }} | ||
|
||
{{ .SchemaMarkdown | trimspace }} |