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

Added allowlist id attribute for api keys #147

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

bansal01yash
Copy link
Contributor

Summary

  1. Added allowlist attachment functionality
  2. Added FF

Screenshots for when the API_KEYS_ALLOW_LIST = false

image

When set to true working as expected

Test

Test the functionality e2e with this config

  required_providers {
    ybm = {
      version = "0.1.0-dev"
      source  = "registry.terraform.io/yugabyte/ybm"
    }
  }
}

provider "ybm" {
  host            = "devcloud.yugabyte.com"
  use_secure_host = true
  auth_token      = var.auth_token
}

variable "auth_token" {
  type        = string
  description = "The authentication token."
  sensitive   = true
}

resource "ybm_allow_list" "mylist" {
  allow_list_name        = "all"
  allow_list_description = "allow all the ip addresses"
  cidr_list              = ["0.0.0.0/0"]
}
resource "ybm_allow_list" "mylist2" {
  allow_list_name        = "all2"
  allow_list_description = "allow all the ip addresses"
  cidr_list              = ["0.0.0.0/0"]
}

resource "ybm_api_key" "example_api_key" {
  name        = "tf-key5"
  description = "TF created key" #Optional
  duration    = 0
  unit        = "Hours"
  role_name   = "Developer"
  allow_list_ids = [ybm_allow_list.mylist.allow_list_id,ybm_allow_list.mylist2.allow_list_id]
}

@bansal01yash bansal01yash requested a review from a team as a code owner January 15, 2025 06:26
@bansal01yash bansal01yash force-pushed the CLOUDGA-25139-api-key-allow-list branch 3 times, most recently from fadca56 to 0872ee3 Compare January 15, 2025 14:00
@bansal01yash bansal01yash force-pushed the CLOUDGA-25139-api-key-allow-list branch from 0872ee3 to f14c13b Compare January 15, 2025 14:05
@bansal01yash bansal01yash merged commit ef41639 into main Jan 16, 2025
2 checks passed
@bansal01yash bansal01yash deleted the CLOUDGA-25139-api-key-allow-list branch January 16, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants