-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add assume role with web identity, expand assume role properties in c…
…reds validation (#3084) - Add `assumeRoleWithWebIdentity` to creds validation #2252 - Add most missing properties to assumeRole credentials check - Add duration to supported assumeRole properties Resolves ##2252 The supported properties of both `assumeRole` and `assumeRoleWithWebIdentity` should now match [the ones documented in the registry](https://www.pulumi.com/registry/packages/aws/installation-configuration/#configuration-options).
- Loading branch information
Showing
2 changed files
with
79 additions
and
5 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
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,27 @@ | ||
package provider | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/pulumi/pulumi/sdk/v3/go/common/resource" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestParseDuration(t *testing.T) { | ||
for _, v := range []string{ | ||
"1", | ||
"60", | ||
"3600", | ||
"86400", | ||
"1s", | ||
"60s", | ||
"3600s", | ||
} { | ||
valid := resource.PropertyMap{ | ||
"durationSeconds": resource.NewStringProperty(v), | ||
} | ||
d, err := durationFromConfig(valid, "durationSeconds", []string{}) | ||
assert.NoError(t, err) | ||
assert.True(t, d > 0) | ||
} | ||
} |