Repository navigation
Add food-oasis-local-dev IAM user - #232
Merged
Merged
Conversation
Contributor
|
Terraform plan in terraform Plan: 3 to add, 0 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_iam_policy.food_oasis_local_dev will be created
+ resource "aws_iam_policy" "food_oasis_local_dev" {
+ arn = (known after apply)
+ attachment_count = (known after apply)
+ description = "Food Oasis local development: send email as donotreply@foodoasis.net and search the staging place index"
+ id = (known after apply)
+ name = "food-oasis-local-dev"
+ name_prefix = (known after apply)
+ path = "/"
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "ses:SendEmail",
+ "ses:SendRawEmail",
]
+ Condition = {
+ StringEquals = {
+ "ses:FromAddress" = "donotreply@foodoasis.net"
}
}
+ Effect = "Allow"
+ Resource = "arn:aws:ses:us-west-2:035866691871:identity/foodoasis.net"
+ Sid = "SendAsDoNotReply"
},
+ {
+ Action = [
+ "geo:SearchPlaceIndexForText",
]
+ Effect = "Allow"
+ Resource = "arn:aws:geo:us-west-2:035866691871:place-index/food-oasis-stage"
+ Sid = "SearchStagingPlaceIndex"
},
]
+ Version = "2012-10-17"
}
)
+ policy_id = (known after apply)
+ tags = {
+ "Project" = "food-oasis"
}
+ tags_all = {
+ "Project" = "food-oasis"
+ "managed-by" = "terraform-devops-security"
}
}
# aws_iam_user.food_oasis_local_dev will be created
+ resource "aws_iam_user" "food_oasis_local_dev" {
+ arn = (known after apply)
+ force_destroy = false
+ id = (known after apply)
+ name = "food-oasis-local-dev"
+ path = "/"
+ tags = {
+ "Project" = "food-oasis"
}
+ tags_all = {
+ "Project" = "food-oasis"
+ "managed-by" = "terraform-devops-security"
}
+ unique_id = (known after apply)
}
# aws_iam_user_policy_attachment.food_oasis_local_dev will be created
+ resource "aws_iam_user_policy_attachment" "food_oasis_local_dev" {
+ id = (known after apply)
+ policy_arn = (known after apply)
+ user = "food-oasis-local-dev"
}
Plan: 3 to add, 0 to change, 0 to destroy.✅ Plan applied in Apply Terraform changes on merge #63 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
food-oasis-local-dev, a shared program-only IAM user for Food Oasis developers' local setups. Their.envfiles hold an AWS access key today, and that key belongs to the Food Oasis account, which is being deleted (hackforla/incubator#284).Declared in
aws-users-legacy.tfas a bare resource, because the module would give it a console login and trigger the user-bot. The header comment there is updated to name it as the one exception.Its policy covers only what the Food Oasis server calls:
ses:SendEmail/ses:SendRawEmailon thefoodoasis.netidentity, only withses:FromAddress=donotreply@foodoasis.netgeo:SearchPlaceIndexForTextonfood-oasis-stageChecked with the IAM policy simulator: both sends from
donotreply@and the staging search are allowed; another From address, no From address, the production index, suggestions search and unrelated actions are denied.Expected plan: 3 to add (user, policy, attachment), 0 to change, 0 to destroy.
The access key is created by hand after the apply and stored in the
FOLA - DevOpsvault, so it never enters the Terraform state.