123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- {
- "version": 4,
- "terraform_version": "0.12.25",
- "serial": 23,
- "lineage": "57457749-c0e1-81c8-cb3c-303f763c24e9",
- "outputs": {},
- "resources": [
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "data",
- "type": "aws_caller_identity",
- "name": "current",
- "provider": "provider.aws",
- "instances": [
- {
- "schema_version": 0,
- "attributes": {
- "account_id": "471284459109",
- "arn": "arn:aws:iam::471284459109:user/MDRAdmin",
- "id": "2020-05-27 00:54:40.602092 +0000 UTC",
- "user_id": "AIDAW3OV6EZS5DFJAO7CP"
- }
- }
- ]
- },
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "data",
- "type": "aws_iam_policy_document",
- "name": "mdradmin_tfstate_setup",
- "provider": "provider.aws",
- "instances": [
- {
- "schema_version": 0,
- "attributes": {
- "id": "1838532126",
- "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DynamoDBTablesAndLocking\",\n \"Effect\": \"Allow\",\n \"Action\": \"dynamodb:*\",\n \"Resource\": \"arn:aws:dynamodb:us-east-1:471284459109:table/afsxdr-terraform-state\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"DynamoDBTablesAndLocking2\",\n \"Effect\": \"Allow\",\n \"Action\": \"dynamodb:ListTables\",\n \"Resource\": \"arn:aws:dynamodb:us-east-1:471284459109:table/*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"KMSKeyCreate\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"kms:List*\",\n \"kms:DeleteKey\",\n \"kms:DeleteAlias\",\n \"kms:CreateKey\",\n \"kms:CreateAlias\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3AllResources\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:HeadBucket\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3ManageStateBucket\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:Put*\",\n \"s3:ListBucket\",\n \"s3:Get*\",\n \"s3:DeleteBucket\",\n \"s3:CreateBucket\"\n ],\n \"Resource\": \"arn:aws:s3:::afsxdr-terraform-state\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3ObjectOperations\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:PutObject*\",\n \"s3:GetObject*\",\n \"s3:DeleteObject*\"\n ],\n \"Resource\": \"arn:aws:s3:::afsxdr-terraform-state/*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n }\n ]\n}",
- "override_json": null,
- "policy_id": null,
- "source_json": null,
- "statement": [
- {
- "actions": [
- "dynamodb:*"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "arn:aws:dynamodb:us-east-1:471284459109:table/afsxdr-terraform-state"
- ],
- "sid": "DynamoDBTablesAndLocking"
- },
- {
- "actions": [
- "dynamodb:ListTables"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "arn:aws:dynamodb:us-east-1:471284459109:table/*"
- ],
- "sid": "DynamoDBTablesAndLocking2"
- },
- {
- "actions": [
- "kms:CreateAlias",
- "kms:CreateKey",
- "kms:DeleteAlias",
- "kms:DeleteKey",
- "kms:List*"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "*"
- ],
- "sid": "KMSKeyCreate"
- },
- {
- "actions": [
- "s3:HeadBucket"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "*"
- ],
- "sid": "S3AllResources"
- },
- {
- "actions": [
- "s3:CreateBucket",
- "s3:DeleteBucket",
- "s3:Get*",
- "s3:ListBucket",
- "s3:Put*"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "arn:aws:s3:::afsxdr-terraform-state"
- ],
- "sid": "S3ManageStateBucket"
- },
- {
- "actions": [
- "s3:DeleteObject*",
- "s3:GetObject*",
- "s3:PutObject*"
- ],
- "condition": [
- {
- "test": "BoolIfExists",
- "values": [
- "true"
- ],
- "variable": "aws:MultiFactorAuthPresent"
- }
- ],
- "effect": "Allow",
- "not_actions": [],
- "not_principals": [],
- "not_resources": [],
- "principals": [],
- "resources": [
- "arn:aws:s3:::afsxdr-terraform-state/*"
- ],
- "sid": "S3ObjectOperations"
- }
- ],
- "version": "2012-10-17"
- }
- }
- ]
- },
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "data",
- "type": "aws_partition",
- "name": "current",
- "provider": "provider.aws",
- "instances": [
- {
- "schema_version": 0,
- "attributes": {
- "dns_suffix": "amazonaws.com",
- "id": "2020-05-27 00:54:40.329518 +0000 UTC",
- "partition": "aws"
- }
- }
- ]
- },
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "data",
- "type": "aws_region",
- "name": "current",
- "provider": "provider.aws",
- "instances": [
- {
- "schema_version": 0,
- "attributes": {
- "current": null,
- "description": "US East (N. Virginia)",
- "endpoint": "ec2.us-east-1.amazonaws.com",
- "id": "us-east-1",
- "name": "us-east-1"
- }
- }
- ]
- },
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "managed",
- "type": "aws_iam_policy",
- "name": "mdradmin_tfstate_setup",
- "provider": "provider.aws",
- "instances": [
- {
- "schema_version": 0,
- "attributes": {
- "arn": "arn:aws:iam::471284459109:policy/bootstrap/mdradmmin_tfstate_setup",
- "description": "Gives MDRAdmin account rights needed to set up tfstate management",
- "id": "arn:aws:iam::471284459109:policy/bootstrap/mdradmmin_tfstate_setup",
- "name": "mdradmmin_tfstate_setup",
- "name_prefix": null,
- "path": "/bootstrap/",
- "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DynamoDBTablesAndLocking\",\n \"Effect\": \"Allow\",\n \"Action\": \"dynamodb:*\",\n \"Resource\": \"arn:aws:dynamodb:us-east-1:471284459109:table/afsxdr-terraform-state\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"DynamoDBTablesAndLocking2\",\n \"Effect\": \"Allow\",\n \"Action\": \"dynamodb:ListTables\",\n \"Resource\": \"arn:aws:dynamodb:us-east-1:471284459109:table/*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"KMSKeyCreate\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"kms:List*\",\n \"kms:DeleteKey\",\n \"kms:DeleteAlias\",\n \"kms:CreateKey\",\n \"kms:CreateAlias\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3AllResources\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:HeadBucket\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3ManageStateBucket\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:Put*\",\n \"s3:ListBucket\",\n \"s3:Get*\",\n \"s3:DeleteBucket\",\n \"s3:CreateBucket\"\n ],\n \"Resource\": \"arn:aws:s3:::afsxdr-terraform-state\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n },\n {\n \"Sid\": \"S3ObjectOperations\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:PutObject*\",\n \"s3:GetObject*\",\n \"s3:DeleteObject*\"\n ],\n \"Resource\": \"arn:aws:s3:::afsxdr-terraform-state/*\",\n \"Condition\": {\n \"BoolIfExists\": {\n \"aws:MultiFactorAuthPresent\": \"true\"\n }\n }\n }\n ]\n}"
- },
- "private": "bnVsbA=="
- }
- ]
- },
- {
- "module": "module.mdradmin-bootstrap",
- "mode": "managed",
- "type": "aws_iam_user_policy_attachment",
- "name": "this",
- "each": "map",
- "provider": "provider.aws",
- "instances": [
- {
- "index_key": "MDRAdmin",
- "schema_version": 0,
- "attributes": {
- "id": "MDRAdmin-20200525151630712700000001",
- "policy_arn": "arn:aws:iam::471284459109:policy/bootstrap/mdradmmin_tfstate_setup",
- "user": "MDRAdmin"
- },
- "private": "bnVsbA==",
- "dependencies": [
- "module.mdradmin-bootstrap.aws_iam_policy.mdradmin_tfstate_setup"
- ]
- }
- ]
- }
- ]
- }
|