Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced documentation and property dependency for quota in google_identity_platform_config #20627

Conversation

modular-magician
Copy link
Collaborator

Fixes #16172

Release Note Template for Downstream PRs (will be copied)

identityplatform: marked `quota.0.sign_up_quota_config` subfields conditionally required in `google_identity_platform_config` to move errors from apply time up to plan time, and clarified the rule in documentation

Manual testing:
After the change the error message is more clear on the expectations

Sample config:

resource "google_project_service" "identitytoolkit" {
  provider = google-beta  
  project = "my-project"
  service = "identitytoolkit.googleapis.com"
}

resource "google_identity_platform_config" "default" {
  provider = google-beta  
  project = "my-project"
  autodelete_anonymous_users = true
  sign_in {
    allow_duplicate_emails = true

    email {
        enabled = false
    }

    phone_number {
      enabled = false
    }

    anonymous {
      enabled = false
    }
  }
  sms_region_config {
    allowlist_only {
      allowed_regions = [
        "US",
        "CA",
      ]
    }
  }
  quota {
    sign_up_quota_config {
      quota = 100
    }
  }
  authorized_domains = [
    "localhost",
    "pavan-test-terraform.firebaseapp.com",
    "pavan-test-terraform.web.app",
  ]

  depends_on = [ google_project_service.identitytoolkit ]
}

Error before changes:

 Error 400: INVALID_CONFIG : SignUp quota must start between now and 365 days from now.

Error after changes:

│ Error: Missing required argument
│ 
│   with google_identity_platform_config.default,
│   on main.tf line 36, in resource "google_identity_platform_config" "default":
│   36:       quota = 100
│ 
│ "quota.0.sign_up_quota_config.0.quota": all of
│ `quota.0.sign_up_quota_config.0.quota,quota.0.sign_up_quota_config.0.quota_duration,quota.0.sign_up_quota_config.0.start_time` must be specified

Derived from GoogleCloudPlatform/magic-modules#12315

…_identity_platform_config` (hashicorp#12315)

[upstream:0b617ed01a5c89bc49592999607ef0141d63043b]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner December 9, 2024 17:36
@modular-magician modular-magician merged commit 45e5733 into hashicorp:main Dec 9, 2024
4 checks passed
Copy link

github-actions bot commented Jan 9, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for google_identity_platform_config quotas is not correct.
1 participant