Giter Club home page Giter Club logo

Comments (6)

Waschnick avatar Waschnick commented on May 31, 2024 1

Hey @lgallard you should be able to add it now, it was recently released:

https://github.com/hashicorp/terraform-provider-aws/blob/v3.32.0/CHANGELOG.md
"Add support for access_token_validity"

from terraform-aws-cognito-user-pool.

lgallard avatar lgallard commented on May 31, 2024 1

@Waschnick Release 0.10.2 added the support. For the above screenshot define as follows:

# clients
clients = [
   {
     allowed_oauth_flows                  = []
     allowed_oauth_flows_user_pool_client = false
     allowed_oauth_scopes                 = []
     callback_urls                        = ["https://mydomain.com/callback"]
     default_redirect_uri                 = "https://mydomain.com/callback"
     explicit_auth_flows                  = []
     generate_secret                      = true
     logout_urls                          = []
     name                                 = "test1"
     read_attributes                      = ["email"]
     supported_identity_providers         = []
     write_attributes                     = []
     access_token_validity                = 1 
     id_token_validity                    = 1
     refresh_token_validity               = 60
     token_validity_units = {
       access_token  = "hours"
       id_token      = "hours"
       refresh_token = "days"
     }
   },
...
 ]

The complete example has this definition, alongside other clients definitions examples.

from terraform-aws-cognito-user-pool.

lgallard avatar lgallard commented on May 31, 2024

@Waschnick I don't see those attributes in the resource https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool_client

Where did you get client_access_token_validity and client_access_token_validity names ?

In fact, there's an open issue in the AWS provider at hashicorp/terraform-provider-aws#14919 which requests those attributes to be included in the resource.

As soon as there are available I can add them to the module.

Thanks por reporting them!

from terraform-aws-cognito-user-pool.

Waschnick avatar Waschnick commented on May 31, 2024

Argh you are right, again. I would just implement it myself and create a PR for it on the hashicorp repo, but it has nearly 700 open PRs. EDIT: No need, there is already an open PR for this...

It's the same with the Lambda hook for "CustomSender" (CustomEmailSender), which is only supported via the AWS Cli (its not even visible in the AWS console). I created a shell script running in my CI pipeline to add the lambda via AWS Cli, but that's for the user-pool, which is way easier to configure. The client has way to many attributes...

from terraform-aws-cognito-user-pool.

lgallard avatar lgallard commented on May 31, 2024

@Waschnick another approach is to use a CloudFormation stack called from Terraform to define the client. Take a look at AWS::Cognito::UserPoolClient and the Terraform's resource aws_cloudformation_stack if you want to explore that option.

from terraform-aws-cognito-user-pool.

lgallard avatar lgallard commented on May 31, 2024

@Waschnick I will include it in the next release!

from terraform-aws-cognito-user-pool.

Related Issues (20)

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.