Skip to content

Commit ef1652b

Browse files
committed
noop3
1 parent 873b0be commit ef1652b

File tree

232 files changed

+7691
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+7691
-2
lines changed

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function run(): Promise<void> {
128128
const terraformChangedModules = getTerraformChangedModules(terraformModules);
129129
const terraformModuleNamesToRemove = getTerraformModulesToRemove(allTags, terraformModules);
130130

131-
/*
131+
132132
if (!context.isPrMergeEvent) {
133133
await handleReleasePlanComment(config, terraformChangedModules, terraformModuleNamesToRemove);
134134
} else {
@@ -186,7 +186,7 @@ export async function run(): Promise<void> {
186186
setOutput('changed-modules-map', changedModulesMap);
187187
setOutput('all-module-names', allModuleNames);
188188
setOutput('all-module-paths', allModulePaths);
189-
setOutput('all-modules-map', allModulesMap); */
189+
setOutput('all-modules-map', allModulesMap);
190190
} catch (error) {
191191
if (error instanceof Error) {
192192
setFailed(error.message);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AWS S3 Bucket Object Terraform Example Module
2+
3+
Creates S3 bucket objects with different configurations.
4+
5+
## Usage
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
resource "aws_s3_object" "this" {
2+
count = var.create ? 1 : 0
3+
4+
bucket = var.bucket
5+
key = var.key
6+
force_destroy = var.force_destroy
7+
8+
acl = var.acl
9+
storage_class = try(upper(var.storage_class), var.storage_class)
10+
11+
source = var.file_source
12+
content = var.content
13+
content_base64 = var.content_base64
14+
etag = var.etag
15+
16+
cache_control = var.cache_control
17+
content_disposition = var.content_disposition
18+
content_encoding = var.content_encoding
19+
content_language = var.content_language
20+
content_type = var.content_type
21+
website_redirect = var.website_redirect
22+
metadata = var.metadata
23+
24+
server_side_encryption = var.server_side_encryption
25+
kms_key_id = var.kms_key_id
26+
bucket_key_enabled = var.bucket_key_enabled
27+
28+
object_lock_legal_hold_status = try(tobool(var.object_lock_legal_hold_status) ? "ON" : upper(var.object_lock_legal_hold_status), var.object_lock_legal_hold_status)
29+
object_lock_mode = try(upper(var.object_lock_mode), var.object_lock_mode)
30+
object_lock_retain_until_date = var.object_lock_retain_until_date
31+
32+
source_hash = var.source_hash
33+
34+
tags = var.tags
35+
36+
dynamic "override_provider" {
37+
for_each = var.override_default_tags ? [true] : []
38+
39+
content {
40+
default_tags {
41+
tags = {}
42+
}
43+
}
44+
}
45+
46+
lifecycle {
47+
ignore_changes = [object_lock_retain_until_date]
48+
}
49+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
output "s3_object_id" {
2+
description = "The key of S3 object"
3+
value = try(aws_s3_object.this[0].id, "")
4+
}
5+
6+
output "s3_object_etag" {
7+
description = "The ETag generated for the object (an MD5 sum of the object content)."
8+
value = try(aws_s3_object.this[0].etag, "")
9+
}
10+
11+
output "s3_object_version_id" {
12+
description = "A unique version ID value for the object, if bucket versioning is enabled."
13+
value = try(aws_s3_object.this[0].version_id, "")
14+
}

tf-modules2/s3-bucket-object copy 10/tests/default.tftest.hcl

Whitespace-only changes.

tf-modules2/s3-bucket-object copy 10/tests/sub/main.tftest.hcl

Whitespace-only changes.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
variable "create" {
2+
description = "Whether to create this resource or not?"
3+
type = bool
4+
default = true
5+
}
6+
7+
variable "bucket" {
8+
description = "The name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified."
9+
type = string
10+
default = ""
11+
}
12+
13+
variable "key" {
14+
description = "The name of the object once it is in the bucket."
15+
type = string
16+
default = ""
17+
}
18+
19+
variable "file_source" {
20+
description = "The path to a file that will be read and uploaded as raw bytes for the object content."
21+
type = string
22+
default = null
23+
}
24+
25+
variable "content" {
26+
description = "Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text."
27+
type = string
28+
default = null
29+
}
30+
31+
variable "content_base64" {
32+
description = "Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file."
33+
type = string
34+
default = null
35+
}
36+
37+
variable "acl" {
38+
description = "The canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private."
39+
type = string
40+
default = null
41+
}
42+
43+
variable "cache_control" {
44+
description = "Specifies caching behavior along the request/reply chain."
45+
type = string # map?
46+
default = null
47+
}
48+
49+
variable "content_disposition" {
50+
description = "Specifies presentational information for the object."
51+
type = string # map?
52+
default = null
53+
}
54+
55+
variable "content_encoding" {
56+
description = "Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field."
57+
type = string
58+
default = null
59+
}
60+
61+
variable "content_language" {
62+
description = "The language the content is in e.g. en-US or en-GB."
63+
type = string
64+
default = null
65+
}
66+
67+
variable "content_type" {
68+
description = "A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input."
69+
type = string
70+
default = null
71+
}
72+
73+
variable "website_redirect" {
74+
description = "Specifies a target URL for website redirect."
75+
type = string
76+
default = null
77+
}
78+
79+
variable "storage_class" {
80+
description = "Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD."
81+
type = string
82+
default = null
83+
}
84+
85+
variable "etag" {
86+
description = "Used to trigger updates. This attribute is not compatible with KMS encryption, kms_key_id or server_side_encryption = \"aws:kms\"."
87+
type = string
88+
default = null
89+
}
90+
91+
variable "server_side_encryption" {
92+
description = "Specifies server-side encryption of the object in S3. Valid values are \"AES256\" and \"aws:kms\"."
93+
type = string
94+
default = null
95+
}
96+
97+
variable "kms_key_id" {
98+
description = "Amazon Resource Name (ARN) of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws_kms_key resource, use the arn attribute. If referencing the aws_kms_alias data source or resource, use the target_key_arn attribute. Terraform will only perform drift detection if a configuration value is provided."
99+
type = string
100+
default = null
101+
}
102+
103+
variable "bucket_key_enabled" {
104+
description = "Whether or not to use Amazon S3 Bucket Keys for SSE-KMS."
105+
type = bool
106+
default = null
107+
}
108+
109+
variable "metadata" {
110+
description = "A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API)."
111+
type = map(string)
112+
default = {}
113+
}
114+
115+
variable "tags" {
116+
description = "A map of tags to assign to the object."
117+
type = map(string)
118+
default = {}
119+
}
120+
121+
variable "force_destroy" {
122+
description = "Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled."
123+
type = bool
124+
default = false
125+
}
126+
127+
variable "object_lock_legal_hold_status" {
128+
description = "The legal hold status that you want to apply to the specified object. Valid values are ON and OFF."
129+
type = string
130+
default = null
131+
}
132+
133+
variable "object_lock_mode" {
134+
description = "The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE."
135+
type = string
136+
default = null
137+
}
138+
139+
variable "object_lock_retain_until_date" {
140+
description = "The date and time, in RFC3339 format, when this object's object lock will expire."
141+
type = string
142+
default = null
143+
}
144+
145+
variable "source_hash" {
146+
description = "Triggers updates like etag but useful to address etag encryption limitations. Set using filemd5(\"path/to/source\") (Terraform 0.11.12 or later). (The value is only stored in state and not saved by AWS.)"
147+
type = string
148+
default = null
149+
}
150+
151+
variable "override_default_tags" {
152+
description = "Ignore provider default_tags. S3 objects support a maximum of 10 tags."
153+
type = bool
154+
default = false
155+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
terraform {
2+
required_version = ">= 1.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 5.24"
8+
}
9+
}
10+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AWS S3 Bucket Object Terraform Example Module
2+
3+
Creates S3 bucket objects with different configurations.
4+
5+
## Usage
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
resource "aws_s3_object" "this" {
2+
count = var.create ? 1 : 0
3+
4+
bucket = var.bucket
5+
key = var.key
6+
force_destroy = var.force_destroy
7+
8+
acl = var.acl
9+
storage_class = try(upper(var.storage_class), var.storage_class)
10+
11+
source = var.file_source
12+
content = var.content
13+
content_base64 = var.content_base64
14+
etag = var.etag
15+
16+
cache_control = var.cache_control
17+
content_disposition = var.content_disposition
18+
content_encoding = var.content_encoding
19+
content_language = var.content_language
20+
content_type = var.content_type
21+
website_redirect = var.website_redirect
22+
metadata = var.metadata
23+
24+
server_side_encryption = var.server_side_encryption
25+
kms_key_id = var.kms_key_id
26+
bucket_key_enabled = var.bucket_key_enabled
27+
28+
object_lock_legal_hold_status = try(tobool(var.object_lock_legal_hold_status) ? "ON" : upper(var.object_lock_legal_hold_status), var.object_lock_legal_hold_status)
29+
object_lock_mode = try(upper(var.object_lock_mode), var.object_lock_mode)
30+
object_lock_retain_until_date = var.object_lock_retain_until_date
31+
32+
source_hash = var.source_hash
33+
34+
tags = var.tags
35+
36+
dynamic "override_provider" {
37+
for_each = var.override_default_tags ? [true] : []
38+
39+
content {
40+
default_tags {
41+
tags = {}
42+
}
43+
}
44+
}
45+
46+
lifecycle {
47+
ignore_changes = [object_lock_retain_until_date]
48+
}
49+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
output "s3_object_id" {
2+
description = "The key of S3 object"
3+
value = try(aws_s3_object.this[0].id, "")
4+
}
5+
6+
output "s3_object_etag" {
7+
description = "The ETag generated for the object (an MD5 sum of the object content)."
8+
value = try(aws_s3_object.this[0].etag, "")
9+
}
10+
11+
output "s3_object_version_id" {
12+
description = "A unique version ID value for the object, if bucket versioning is enabled."
13+
value = try(aws_s3_object.this[0].version_id, "")
14+
}

tf-modules2/s3-bucket-object copy 11/tests/default.tftest.hcl

Whitespace-only changes.

tf-modules2/s3-bucket-object copy 11/tests/sub/main.tftest.hcl

Whitespace-only changes.

0 commit comments

Comments
 (0)