Skip to content

Commit

Permalink
updated the snippet ID names for IAM Policy examples to proposed new …
Browse files Browse the repository at this point in the history
…standard
  • Loading branch information
bisdavid committed Oct 25, 2018
1 parent a1c37fa commit 1e37bdd
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.role_policy_grants_basic_access_to_all_secrets_and_gsv_to_specific_master_secret.iam]
//snippet-start:[secretsmanager.iam_policy.role_policy_grants_basic_access_to_all_secrets_and_gsv_to_specific_master_secret]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -30,4 +30,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.role_policy_grants_basic_access_to_all_secrets_and_gsv_to_specific_master_secret.iam]
//snippet-end:[secretsmanager.iam_policy.role_policy_grants_basic_access_to_all_secrets_and_gsv_to_specific_master_secret]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_attached_user_basic_access_to_all_secrets.iam]
//snippet-start:[secretsmanager.iam_policy.grants_attached_user_basic_access_to_all_secrets]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -23,4 +23,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_attached_user_basic_access_to_all_secrets.iam]
//snippet-end:[secretsmanager.iam_policy.grants_attached_user_basic_access_to_all_secrets]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_user_all_access_to_secret.iam]
//snippet-start:[secretsmanager.iam_policy.grants_user_all_access_to_secret]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -18,4 +18,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_user_all_access_to_secret.iam]
//snippet-end:[secretsmanager.iam_policy.grants_user_all_access_to_secret]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_role_gsv_to_AWSCURRENT.iam]
//snippet-start:[secretsmanager.iam_policy.grants_role_gsv_to_AWSCURRENT]
{
"Version" : "2012-10-17",
"Statement" : [
Expand All @@ -23,4 +23,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_role_gsv_to_AWSCURRENT.iam]
//snippet-end:[secretsmanager.iam_policy.grants_role_gsv_to_AWSCURRENT]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_gsv_to_specific_user.iam]
//snippet-start:[secretsmanager.iam_policy.grants_gsv_to_specific_user]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -18,4 +18,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_gsv_to_specific_user.iam]
//snippet-end:[secretsmanager.iam_policy.grants_gsv_to_specific_user]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_role_gsv_only_AWSCURRENT.iam]
//snippet-start:[secretsmanager.iam_policy.grants_role_gsv_only_AWSCURRENT]
{
"Sid": "Allow an app associated with an &IAM; role to only read the current version of a secret",
"Effect": "Allow",
Expand All @@ -15,4 +15,4 @@
"Condition": { "ForAnyValue:StringEquals": {"secretsmanager:VersionStage": "AWSCURRENT" } },
"Resource": "*"
}
//snippet-end:[snippet.secretsmanager.grants_role_gsv_only_AWSCURRENT.iam]
//snippet-end:[secretsmanager.iam_policy.grants_role_gsv_only_AWSCURRENT]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.delegates_read_only_access_to_account.iam]
//snippet-start:[secretsmanager.iam_policy.delegates_read_only_access_to_account]
{
"Sid": "Allow users or roles in account 123456789012 who are delegated access by that account's administrator to have read access to the secret",
"Effect": "Allow",
Expand All @@ -18,4 +18,4 @@
],
"Resource": "*"
}
//snippet-end:[snippet.secretsmanager.delegates_read_only_access_to_account.iam]
//snippet-end:[secretsmanager.iam_policy.delegates_read_only_access_to_account]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.delegates_secret_access_to_account.iam]
//snippet-start:[secretsmanager.iam_policy.delegates_secret_access_to_account]
{
"Version" : "2012-10-17",
"Statement" : [
Expand All @@ -23,4 +23,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.delegates_secret_access_to_account.iam]
//snippet-end:[secretsmanager.iam_policy.delegates_secret_access_to_account]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_access_to_master_secret_to_rotation_lambda.iam]
//snippet-start:[secretsmanager.iam_policy.grants_access_to_master_secret_to_rotation_lambda]
{
"Statement": [
{
Expand Down Expand Up @@ -51,4 +51,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_access_to_master_secret_to_rotation_lambda.iam]
//snippet-end:[secretsmanager.iam_policy.grants_access_to_master_secret_to_rotation_lambda]
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_access_to_rotation_lambda.iam]
//snippet-start:[secretsmanager.iam_policy.grants_access_to_rotation_lambda]
{
"Statement": [
{
Expand Down Expand Up @@ -43,4 +43,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_access_to_rotation_lambda.iam]
//snippet-end:[secretsmanager.iam_policy.grants_access_to_rotation_lambda]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.trust_policy_lets_asm_invoke_rotation_function.iam]
//snippet-start:[secretsmanager.iam_policy.trust_policy_lets_asm_invoke_rotation_function]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -18,4 +18,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.trust_policy_lets_asm_invoke_rotation_function.iam]
//snippet-end:[secretsmanager.iam_policy.trust_policy_lets_asm_invoke_rotation_function]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_read_to_only_AWSCURRENT_version.iam]
//snippet-start:[secretsmanager.iam_policy.grants_read_to_only_AWSCURRENT_version]
{
"Policy": {
"Version": "2012-10-17",
Expand All @@ -20,4 +20,4 @@
]
}
}
//snippet-end:[snippet.secretsmanager.grants_read_to_only_AWSCURRENT_version.iam]
//snippet-end:[secretsmanager.iam_policy.grants_read_to_only_AWSCURRENT_version]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_principal_read_access_to_path_and_gsv_to_AWSCURRENT.iam]
//snippet-start:[secretsmanager.iam_policy.grants_principal_read_access_to_path_and_gsv_to_AWSCURRENT]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -29,4 +29,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_principal_read_access_to_path_and_gsv_to_AWSCURRENT.iam]
//snippet-end:[secretsmanager.iam_policy.grants_principal_read_access_to_path_and_gsv_to_AWSCURRENT]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_access_to_secret_by_name_with_wildcard.iam]
//snippet-start:[secretsmanager.iam_policy.grants_access_to_secret_by_name_with_wildcard]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -28,4 +28,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_access_to_secret_by_name_with_wildcard.iam]
//snippet-end:[secretsmanager.iam_policy.grants_access_to_secret_by_name_with_wildcard]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_access_to_secret_with_tag.iam]
//snippet-start:[secretsmanager.iam_policy.grants_access_to_secret_with_tag]
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -18,4 +18,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_access_to_secret_with_tag.iam]
//snippet-end:[secretsmanager.iam_policy.grants_access_to_secret_with_tag]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_access_from_specified_vpc.iam]
//snippet-start:[secretsmanager.iam_policy.grants_access_from_specified_vpc]
{
"Id": "example-policy-1",
"Version": "2012-10-17",
Expand All @@ -33,4 +33,4 @@

]
}
//snippet-end:[snippet.secretsmanager.grants_access_from_specified_vpc.iam]
//snippet-end:[secretsmanager.iam_policy.grants_access_from_specified_vpc]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.user_policy_grants_gsv_to_secret.iam]
//snippet-start:[secretsmanager.iam_policy.user_policy_grants_gsv_to_secret]
{
"Version": "2012-10-17",
"Statement": {
Expand All @@ -15,4 +15,4 @@
"Resource": "<arn-of-the-secret-the-app-needs-to-access>"
}
}
//snippet-end:[snippet.secretsmanager.user_policy_grants_gsv_to_secret.iam]
//snippet-end:[secretsmanager.iam_policy.user_policy_grants_gsv_to_secret]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grants_admin_from_one_vpc_and_read_secret_value_only_from_another.iam]
//snippet-start:[secretsmanager.iam_policy.grants_admin_from_one_vpc_and_read_secret_value_only_from_another]
{
"Id": "example-policy-2",
"Version": "2012-10-17",
Expand Down Expand Up @@ -55,4 +55,4 @@
}
]
}
//snippet-end:[snippet.secretsmanager.grants_admin_from_one_vpc_and_read_secret_value_only_from_another.iam]
//snippet-end:[secretsmanager.iam_policy.grants_admin_from_one_vpc_and_read_secret_value_only_from_another]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]
//snippet-start:[snippet.secretsmanager.grant_read-only_access_to_secret.iam]
//snippet-start:[secretsmanager.iam_policy.grant_read-only_access_to_secret]
{
"Version": "2012-10-17",
"Statement": {
Expand All @@ -19,4 +19,4 @@
"Resource": "*"
}
}
//snippet-end:[snippet.secretsmanager.grant_read-only_access_to_secret.iam]
//snippet-end:[secretsmanager.iam_policy.grant_read-only_access_to_secret]

0 comments on commit 1e37bdd

Please sign in to comment.