-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #3956 **Patches that I had to fix** - [0006-Workaround-SSM-Parameter-tier-bug.patch](https://github.com/pulumi/pulumi-aws/pull/3959/files#diff-bc50fd3a52055507b304bc3c145e15ba0cce91f2ee336b74317e9f440dd2be2b) - I think we've lost the context on this patch, but it looks like the only change that was needed here was some types changing. - [patches/0041-Revert-Merge-pull-request-35671-from-hashicorp-b-lb-.patch](https://github.com/pulumi/pulumi-aws/pull/3959/files#diff-baabdef52cd795a1b106c14e1e022e073348bb0cd394ba46424e8628c71486c6) - New types were introduced for values - [0042-Allow-creating-lambdas-without-code-related-properti.patch](https://github.com/pulumi/pulumi-aws/pull/3959/files#diff-bb6c556bcbddec7104b20932017312788d85ee8854da2ca9b4e1eaabb7b0abaf) - New types were introduced for values - [patches/0046-Revert-rds-engine_version-Fix-bugs-with-default-only.patch](https://github.com/pulumi/pulumi-aws/pull/3959/files#diff-a2e48d68daadb073990320386c98a66170ff35059dbccb6bcc89a2b88886f9c9) - updates to revert patches are very difficult to reason about.
- Loading branch information
Showing
309 changed files
with
7,385 additions
and
3,954 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,55 +1,52 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Bradley <daniel@pulumi.com> | ||
Date: Fri, 4 Nov 2022 17:24:42 +0000 | ||
From: corymhall <[email protected].com> | ||
Date: Fri, 17 May 2024 13:41:45 -0400 | ||
Subject: [PATCH] Workaround SSM Parameter tier bug | ||
|
||
- Disable "computed". | ||
- Disable diff suppression & counteractions | ||
|
||
diff --git a/internal/service/ssm/parameter.go b/internal/service/ssm/parameter.go | ||
index e63aea86d0..9ea46bb099 100644 | ||
index 7fd23f6b57..5a24c9641a 100644 | ||
--- a/internal/service/ssm/parameter.go | ||
+++ b/internal/service/ssm/parameter.go | ||
@@ -95,15 +95,17 @@ func ResourceParameter() *schema.Resource { | ||
@@ -92,15 +92,17 @@ func resourceParameter() *schema.Resource { | ||
names.AttrTags: tftags.TagsSchema(), | ||
names.AttrTagsAll: tftags.TagsSchemaComputed(), | ||
"tier": { | ||
- Type: schema.TypeString, | ||
- Optional: true, | ||
- Computed: true, | ||
- Type: schema.TypeString, | ||
- Optional: true, | ||
- Computed: true, | ||
+ Type: schema.TypeString, | ||
+ Optional: true, | ||
+ //Computed: true, | ||
+ Default: ssm.ParameterTierStandard, | ||
ValidateFunc: validation.StringInSlice(ssm.ParameterTier_Values(), false), | ||
+ Default: awstypes.ParameterTierStandard, | ||
ValidateDiagFunc: enum.Validate[awstypes.ParameterTier](), | ||
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { | ||
- if old != "" { | ||
- return new == ssm.ParameterTierIntelligentTiering | ||
- return awstypes.ParameterTier(new) == awstypes.ParameterTierIntelligentTiering | ||
- } | ||
- return false | ||
+ return d.Get("tier").(string) == ssm.ParameterTierIntelligentTiering | ||
+ return awstypes.ParameterTier(d.Get("tier").(string)) == awstypes.ParameterTierIntelligentTiering | ||
+ //if old != "" { | ||
+ // return new == ssm.ParameterTierIntelligentTiering | ||
+ //} | ||
+ //return false | ||
}, | ||
}, | ||
names.AttrType: { | ||
@@ -319,11 +321,13 @@ func resourceParameterUpdate(ctx context.Context, d *schema.ResourceData, meta i | ||
AllowedPattern: aws.String(d.Get("allowed_pattern").(string)), | ||
@@ -297,6 +299,14 @@ func resourceParameterUpdate(ctx context.Context, d *schema.ResourceData, meta i | ||
Value: aws.String(value), | ||
} | ||
|
||
+ // FORK: Stack72 to undo this Tier comment out below when associated bridge issue is solved | ||
+ | ||
// Retrieve the value set in the config directly to counteract the DiffSuppressFunc above | ||
- tier := d.GetRawConfig().GetAttr("tier") | ||
- if tier.IsKnown() && !tier.IsNull() { | ||
- paramInput.Tier = aws.String(tier.AsString()) | ||
- } | ||
+ // Retrieve the value set in the config directly to counteract the DiffSuppressFunc above | ||
+ //tier := d.GetRawConfig().GetAttr("tier") | ||
+ //if tier.IsKnown() && !tier.IsNull() { | ||
+ // paramInput.Tier = aws.String(tier.AsString()) | ||
+ //} | ||
+ | ||
if d.HasChange("data_type") { | ||
paramInput.DataType = aws.String(d.Get("data_type").(string)) | ||
input.DataType = aws.String(d.Get("data_type").(string)) | ||
} |
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
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
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
Oops, something went wrong.