Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade terraform-provider-aws to v5.79.0 #4876

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
516 changes: 258 additions & 258 deletions examples/go.mod

Large diffs are not rendered by default.

1,032 changes: 516 additions & 516 deletions examples/go.sum

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions patches/0002-Add-S3-legacy-bucket-to-resources.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ index b048f661fe..b6521d3f55 100644
provider.ConfigureContextFunc = func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {
diff --git a/internal/service/s3legacy/bucket_legacy.go b/internal/service/s3legacy/bucket_legacy.go
new file mode 100644
index 0000000000..fd117b2971
index 0000000000..cd2a293a73
--- /dev/null
+++ b/internal/service/s3legacy/bucket_legacy.go
@@ -0,0 +1,3030 @@
Expand Down Expand Up @@ -80,10 +80,10 @@ index 0000000000..fd117b2971
+
+func ResourceBucketLegacy() *schema.Resource {
+ return &schema.Resource{
+ Create: resourceBucketLegacyCreate,
+ Read: resourceBucketLegacyRead,
+ Update: resourceBucketLegacyUpdate,
+ Delete: resourceBucketLegacyDelete,
+ CreateContext: resourceBucketLegacyCreate,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this fairly mechanical or needs careful review?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly mechanical. AWSClient.Region and AWSClient.Partition are methods now

+ ReadContext: resourceBucketLegacyRead,
+ UpdateContext: resourceBucketLegacyUpdate,
+ DeleteContext: resourceBucketLegacyDelete,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
Expand Down Expand Up @@ -715,7 +715,7 @@ index 0000000000..fd117b2971
+ }
+}
+
+func resourceBucketLegacyCreate(d *schema.ResourceData, meta interface{}) error {
+func resourceBucketLegacyCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) error {
+ conn := meta.(*conns.AWSClient).S3Conn()
+
+ // Get the bucket and acl
Expand All @@ -741,7 +741,7 @@ index 0000000000..fd117b2971
+ log.Printf("[DEBUG] S3 bucket %s has canned ACL %s", bucket, acl)
+ }
+
+ awsRegion := meta.(*conns.AWSClient).Region
+ awsRegion := meta.(*conns.AWSClient).Region(ctx)
+ log.Printf("[DEBUG] S3 bucket create: %s, using region: %s", bucket, awsRegion)
+
+ // Special case us-east-1 region and do not set the LocationConstraint.
Expand Down Expand Up @@ -785,10 +785,10 @@ index 0000000000..fd117b2971
+
+ // Assign the bucket name as the resource ID
+ d.SetId(bucket)
+ return resourceBucketLegacyUpdate(d, meta)
+ return resourceBucketLegacyUpdate(ctx, d, meta)
+}
+
+func resourceBucketLegacyUpdate(d *schema.ResourceData, meta interface{}) error {
+func resourceBucketLegacyUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) error {
+ conn := meta.(*conns.AWSClient).S3Conn()
+
+ if d.HasChange("tags_all") {
Expand Down Expand Up @@ -893,10 +893,10 @@ index 0000000000..fd117b2971
+ }
+ }
+
+ return resourceBucketLegacyRead(d, meta)
+ return resourceBucketLegacyRead(ctx, d, meta)
+}
+
+func resourceBucketLegacyRead(d *schema.ResourceData, meta interface{}) error {
+func resourceBucketLegacyRead(ctx context.Context, d *schema.ResourceData, meta interface{}) error {
+ conn := meta.(*conns.AWSClient).S3Conn()
+ defaultTagsConfig := meta.(*conns.AWSClient).DefaultTagsConfig
+ ignoreTagsConfig := meta.(*conns.AWSClient).IgnoreTagsConfig
Expand Down Expand Up @@ -1353,7 +1353,7 @@ index 0000000000..fd117b2971
+ conf, err := readS3ObjectLockConfigurationLegacy(conn, d.Id())
+
+ // Object lock not supported in all partitions (extra guard, also guards in read func)
+ if err != nil && (meta.(*conns.AWSClient).Partition == endpoints.AwsPartitionID || meta.(*conns.AWSClient).Partition == endpoints.AwsUsGovPartitionID) {
+ if err != nil && (meta.(*conns.AWSClient).Partition(ctx) == endpoints.AwsPartitionID || meta.(*conns.AWSClient).Partition(ctx) == endpoints.AwsUsGovPartitionID) {
+ return fmt.Errorf("error getting S3 Bucket Object Lock configuration: %s", err)
+ }
+
Expand Down Expand Up @@ -1448,7 +1448,7 @@ index 0000000000..fd117b2971
+ }
+
+ arn := arn.ARN{
+ Partition: meta.(*conns.AWSClient).Partition,
+ Partition: meta.(*conns.AWSClient).Partition(ctx),
+ Service: "s3",
+ Resource: d.Id(),
+ }.String()
Expand All @@ -1457,7 +1457,7 @@ index 0000000000..fd117b2971
+ return nil
+}
+
+func resourceBucketLegacyDelete(d *schema.ResourceData, meta interface{}) error {
+func resourceBucketLegacyDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) error {
+ conn := meta.(*conns.AWSClient).S3Conn()
+
+ log.Printf("[DEBUG] S3 Delete Bucket: %s", d.Id())
Expand Down Expand Up @@ -1493,7 +1493,7 @@ index 0000000000..fd117b2971
+ }
+
+ // this line recurses until all objects are deleted or an error is returned
+ return resourceBucketLegacyDelete(d, meta)
+ return resourceBucketLegacyDelete(ctx, d, meta)
+ }
+ }
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ appears in pulumi as `aws.s3.Bucket` and is likely the default version of
the Bucket resource that users will use.

diff --git a/internal/service/s3legacy/bucket_legacy.go b/internal/service/s3legacy/bucket_legacy.go
index fd117b2971..56eed6e0f0 100644
index cd2a293a73..b1dc400249 100644
--- a/internal/service/s3legacy/bucket_legacy.go
+++ b/internal/service/s3legacy/bucket_legacy.go
@@ -572,6 +572,7 @@ func ResourceBucketLegacy() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add EKS cluster certificate_authorities (plural)


diff --git a/internal/service/eks/cluster.go b/internal/service/eks/cluster.go
index b0c38464ec..918c12e0e2 100644
index 43bb45fcab..e628f09cef 100644
--- a/internal/service/eks/cluster.go
+++ b/internal/service/eks/cluster.go
@@ -98,9 +98,24 @@ func resourceCluster() *schema.Resource {
@@ -99,9 +99,24 @@ func resourceCluster() *schema.Resource {
ForceNew: true,
Default: true,
},
Expand All @@ -33,7 +33,7 @@ index b0c38464ec..918c12e0e2 100644
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"data": {
@@ -473,6 +488,13 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta inter
@@ -606,6 +621,13 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta inter
}
d.Set(names.AttrARN, cluster.Arn)
d.Set("bootstrap_self_managed_addons", d.Get("bootstrap_self_managed_addons"))
Expand Down
Loading
Loading