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

Add ability to select all regions when using "cloudconnexa_user_group" #15

Closed
sahaqaa opened this issue Jul 4, 2024 · 2 comments
Closed

Comments

@sahaqaa
Copy link
Contributor

sahaqaa commented Jul 4, 2024

Current use-case: let's say i want to create User Group and select all regions, here is example of how it would look like with current version of Terraform Provider:

variable "cloudconnexa_user_group_all_vpn_region_ids" {
  description = "Regions which can be used"
  type        = list(string)
  default = [
    "se-arn",
    "us-ewr",
    "us-pdx",
    "ap-south-1",
    "us-bos",
    "us-mia",
    "fr-cdg",
    "ie-dub",
    "ca-east-1",
    "eu-central-1",
    "ca-yvr",
    "eu-central-2",
    "us-central-1",
    "us-west-1",
    "us-cmh",
    "us-west-2",
    "il-tlv",
    "af-south-1",
    "us-south-1",
    "it-mxp",
    "eu-west-1",
    "fi-hel",
    "us-sea",
    "jp-hnd",
    "es-mad",
    "us-mci",
    "ch-zrh",
    "ap-southeast-1",
    "ap-southeast-2",
    "pl-waw",
    "br-gru",
    "us-atl",
    "be-bru",
    "us-east-1",
    "ca-yul",
  ]
}

resource "cloudconnexa_user_group" "this" {
  name            = "this_is_my_group"
  connect_auth    = "AUTO"
  internet_access = "LOCAL"
  max_device      = 3
  vpn_region_ids  = var.cloudconnexa_user_group_all_vpn_region_ids
}

Setting all regions seems like an overhead. In API there is ability to specify:

        "allRegionsIncluded": {
          "type": "boolean"
        },

If this would be implemented - code above could be simplified to:

resource "cloudconnexa_user_group" "this" {
  name            = "this_is_my_group"
  connect_auth    = "AUTO"
  internet_access = "LOCAL"
  max_device      = 3
  all_regions_included  = true
}
@sahaqaa
Copy link
Contributor Author

sahaqaa commented Jul 4, 2024

Example of valid Swagger code:

{
  "allRegionsIncluded": true,
  "connectAuth": "AUTO",
  "internetAccess": "LOCAL",
  "maxDevice": 3,
  "name": "qqwwwert"
}

(POST ​"/api​/beta​/user-groups" Create a new user group)

@sahaqaa
Copy link
Contributor Author

sahaqaa commented Sep 2, 2024

Implemented per #44

@sahaqaa sahaqaa closed this as completed Sep 2, 2024
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

No branches or pull requests

1 participant