Skip to content

Terraform module for creating the IAM user required for automated running of Postman tests against Cognito

License

Notifications You must be signed in to change notification settings

Waracle/tf-postman

Repository files navigation

Terraform Postman Module

Supports the creation of the required IAM user and credentials for Postman collections runs that required AWS Cognito authentication

How to use

# -----------------------------------------------------------------------------
# Postman
# -----------------------------------------------------------------------------
module "postman" {
  source                = "github.com/waracle/tf-postman?ref=v1.0.0"
  cognito_user_pool_arn = "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"
}

# This is the access key to access Cognito with
output "postman_access_key" {
  value = module.postman.access_key_id
}
# This is the secret access key to access Cognito with
output "postman_access_key_secret" {
  value = module.postman.access_key_secret
}

Requirements

Name Version
terraform >= 0.14
aws >= 3.27

Providers

Name Version
aws >= 3.27

Modules

No modules.

Resources

Name Type
aws_iam_access_key.user_key resource
aws_iam_policy.apigateway_policy resource
aws_iam_policy.cloudwatch_policy resource
aws_iam_policy.cognito_policy resource
aws_iam_user.user resource
aws_iam_user_policy_attachment.apigateway_user_policy_attachment resource
aws_iam_user_policy_attachment.cloudwatch_user_policy_attachment resource
aws_iam_user_policy_attachment.cognito_user_policy_attachment resource
aws_iam_policy_document.api_policy_document data source
aws_iam_policy_document.cloudwatch_policy_document data source
aws_iam_policy_document.cognito_policy_document data source

Inputs

Name Description Type Default Required
cognito_user_pool_arn [Optional] The ARN of the User Pool to grant the Postman user access to string "" no
username [Optional] The username to assign to the IAM user to be created string "postman-user" no

Outputs

Name Description
access_key_id The access key generated for the user
access_key_secret The secret access key generated for the user
user_arn The ARN of the newly created user
user_name The name of the newly created user

Authors

Module managed by Nick Hammond on behalf of the Waracle team

Please reach out to Waracle if you are looking to build enterprise applications, especially in highly regulated industries.

License

MIT Licensed. See LICENSE for full details.


About

Terraform module for creating the IAM user required for automated running of Postman tests against Cognito

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages