Giter VIP home page Giter VIP logo

rflcnunes / tf-cognito-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

This repository contains Terraform configuration files for setting up and managing an AWS infrastructure focused on AWS Cognito. It is designed to demonstrate the integration of AWS Cognito with an AWS API Gateway REST API, exemplified by a "petstore" application.

HCL 100.00%
api-gateway api-gateway-custom-authorizer api-gateway-endpoint api-gateway-http aws aws-api-gateway aws-cognito cognito cognito-client cognito-idp cognito-pool cognito-user-pool terraform terraform-module

tf-cognito-api's Introduction

Configuration to Cognito and API Gateway

Overview

This repository contains Terraform configuration files for setting up and managing an AWS infrastructure focused on AWS Cognito. It is designed to demonstrate the integration of AWS Cognito with an AWS API Gateway REST API, exemplified by a "petstore" application.

Features

  • AWS Cognito Configuration: Establishes a Cognito service with domain, OAuth scopes, callback URLs, and logout URLs.
  • API Gateway Integration: Defines a REST API with Cognito-based authorization.
  • Cognito Resource Server: Configures a resource server in Cognito with specific scopes.
  • Cognito User Pool Client: Creates a Cognito user pool client for the "petstore" application.
  • Cognito User: Sets up a test user in Cognito.

Repository Structure

  • main.tf: Main Terraform file with basic configuration.
  • variables.tf: Defines variables used in the configurations.
  • cognito.tf: Specific configuration for the AWS Cognito service.
  • petstore-api.tf: Configurations for the REST API via AWS API Gateway.
  • petstore-client.tf: Configurations for the Cognito client in the "petstore" application.
  • petstore-user.tf: Creates a sample user in Cognito.
  • dev.tfvars: Variables for the development environment.
  • modules/: Contains Terraform modules, like the auth module for authentication.

Prerequisites

  • Terraform v1.6.5 or higher.
  • AWS CLI configured with appropriate credentials.

How to Use

  1. Clone the Repository: Clone this repository to your local environment.
  2. AWS Profile Configuration: If you plan to use the existing variables, ensure you have an AWS profile named "tf014" in your AWS credentials. Otherwise, you will need to modify the aws_profile variable in dev.tfvars to match the name of the profile you wish to use.
  3. Terraform Initialization: Navigate to the repository directory and run terraform init to initialize Terraform and install necessary modules and providers.
  4. Terraform Planning: Before applying the changes, run terraform plan -var-file="dev.tfvars" to review the changes that will be made to your infrastructure.
  5. Applying Configurations: Finally, apply the configurations with terraform apply -var-file="dev.tfvars".

tf-cognito-api's People

Contributors

rflcnunes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.