diff --git a/Makefile b/Makefile index e40903b..83e5d2d 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ build: release: GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64 + GOOS=darwin GOARCH=arm64 go build -o ./bin/${BINARY}_${VERSION}_darwin_arm64 GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386 GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64 GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm diff --git a/README.md b/README.md index 72418d1..2e5cc15 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,44 @@ # Terraform Provider Anypoint + This is the first terraform provider for anypoint platform! We aim to provide a sustainable tool to automate your actions in anypoint. -This project was initiated by Mulesoft's consultants and architects from the professional team. We welcome any volunteers interested in joining the initiative no matter where you're from ! +This project was initiated by Mulesoft's consultants and architects from the professional team. We welcome any volunteers interested in joining the initiative no matter where you're from ! ## How it works -This provider uses the anypoint platform APIs to perform actions for each one of the implemented resources. + +This provider uses the anypoint platform APIs to perform actions for each one of the implemented resources. ![alt text](resources/imgs/provider-arch.png) We use the **anypoint client library** as an abstraction layer to perform actions on the platform. -For better maintainability and in order to speed up the development process, the **anypoint client library** is a library generated from OAS3 specifications written by the community. +For better maintainability and in order to speed up the development process, the **anypoint client library** is a library generated from OAS3 specifications written by the community. The following image describes the delivery cycle: ![alt text](resources/imgs/provider-deliver.png) -The cycle is composed of 3 steps: - 1. Pick one resource and understand how it works using tools like Postman, anypoint's documentation and your favorite browser's inspector. +The cycle is composed of 3 steps: + + 1. Pick one resource and understand how it works using tools like Postman, anypoint's documentation and your favorite browser's inspector. 2. Create the OAS3 specification. The specification should at least contain GET, POST and DELETE operations. The specification should be contributed [here](https://github.com/mulesoft-consulting/anypoint-automation-client-generator). Using the OAS spec, a go module will be generated and pushed [here](https://github.com/mulesoft-consulting/anypoint-client-go). - + ![alt text](resources/imgs/provider-cycle.png) - - 3. Implement the resource and related data sources in the provider using the generated library. - + 3. Implement the resource and related data sources in the provider using the generated library. ## How to use + Run the following command to build the provider ```bash -$ go build -o terraform-provider-anypoint +go build -o terraform-provider-anypoint ``` -**N.B:** As of Go 1.13 make sure that your `GOPRIVATE` environment variable includes `github.com/mulesoft-consulting` +**N.B:** As of Go 1.13 make sure that your `GOPRIVATE` environment variable includes `github.com/mulesoft-consulting` ```bash -$ go env -w GOPRIVATE=github.com/mulesoft-consulting +go env -w GOPRIVATE=github.com/mulesoft-consulting ``` ## Test sample configuration @@ -44,17 +46,17 @@ $ go env -w GOPRIVATE=github.com/mulesoft-consulting First, build and install the provider. ```bash -$ make install +make install ``` -Then, navigate inside the `examples` folder, and update your credentials in `main.tf`. +Then, navigate inside the `examples` folder, and update your credentials in `main.tf`. Run the following command to initialize the workspace and apply the sample configuration. ```bash -$ terraform init && terraform apply +terraform init && terraform apply ``` -If you prefer to have your credentials in a separate file, create a `params.tfvars.json` file in the `examples` folder. Then add your parameters as shown in the example below: +If you prefer to have your credentials in a separate file, create a `params.tfvars.json` file in the `examples` folder. Then add your parameters as shown in the example below: ```json { @@ -63,64 +65,74 @@ If you prefer to have your credentials in a separate file, create a `params.tfva "org_id": "REMPLACE_HERE" } ``` + Make sure to add the params file when you apply your terraform configuration as follow: + ```bash -$ terraform init && terraform apply -var-file="params.tfvars.json" +terraform init && terraform apply -var-file="params.tfvars.json" ``` ## Debugging mode + First build the project using + ```bash -$ go build +go build ``` -You should have a new file `terraform-provider-anypoint` in the root of the project. To start the provider in debug mode execute the following: +You should have a new file `terraform-provider-anypoint` in the root of the project. To start the provider in debug mode execute the following: + ```bash -$ dlv exec --headless ./terraform-provider-anypoint -- --debug +dlv exec --headless ./terraform-provider-anypoint -- --debug ``` Once executed, connect your debugger (whether it's your IDE or the debugger client) to the debugger server. The following is an example of how to start a client debugger: + ```bash -$ dlv connect 127.0.0.1:51495 +dlv connect 127.0.0.1:51495 ``` -Then have your client debugger `continue` execution (check the help for more info) then your provider should print something like: +Then have your client debugger `continue` execution (check the help for more info) then your provider should print something like: + ```bash TF_REATTACH_PROVIDERS='{"anypoint.mulesoft.com/automation/anypoint":{"Protocol":"grpc","Pid":69612,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/yc/k0_j_x0945jdthsw7fzw5ysh0000gp/T/plugin598168131"}}}' ``` -Now you can run terraform using the debugger, here's an example: +Now you can run terraform using the debugger, here's an example: ```bash -$ TF_REATTACH_PROVIDERS='{"anypoint.mulesoft.com/automation/anypoint":{"Protocol":"grpc","Pid":69612,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/yc/k0_j_x0945jdthsw7fzw5ysh0000gp/T/plugin598168131"}}}' terraform apply --auto-approve -var-file="params.tfvars.json" +TF_REATTACH_PROVIDERS='{"anypoint.mulesoft.com/automation/anypoint":{"Protocol":"grpc","Pid":69612,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/yc/k0_j_x0945jdthsw7fzw5ysh0000gp/T/plugin598168131"}}}' terraform apply --auto-approve -var-file="params.tfvars.json" ``` ### How to log -Use `log` package to log. Here's an exampe: + +Use `log` package to log. Here's an exampe: ```go log.Println("[DEBUG] Something happened!") ``` ## Documentation -In order to generate a documentation, we use [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs). +In order to generate a documentation, we use [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs). ## Create Release -Follow [documentation](https://www.terraform.io/docs/registry/providers/publishing.html#using-goreleaser-locally). +Follow [documentation](https://www.terraform.io/docs/registry/providers/publishing.html#using-goreleaser-locally). ## How to contribute -You can contribute by: - * Testing the tool and letting us know of any problems you encounter. - * Contributing specifications for resources [here](https://github.com/mulesoft-consulting/anypoint-automation-client-generator). - * Contributing code in the provider itself here. +You can contribute by: + +* Testing the tool and letting us know of any problems you encounter. +* Contributing specifications for resources [here](https://github.com/mulesoft-consulting/anypoint-automation-client-generator). +* Contributing code in the provider itself here. ## Credits -Made with love. +Made with love. + +## Disclaimer -## Disclaimer -**This is an [UNLICENSED software, please review the considerations](UNLICENSE.md).** +**This is an [UNLICENSED software, please review the considerations](UNLICENSE.md).** This is an open source project, it does not form part of the official MuleSoft product stack, and is therefore not included in MuleSoft support SLAs. Issues should be directed to the community, who will try to assist on a best endeavours basis. This application is distributed **as is**. diff --git a/anypoint/data_source_connected_app.go b/anypoint/data_source_connected_app.go new file mode 100644 index 0000000..c3bceff --- /dev/null +++ b/anypoint/data_source_connected_app.go @@ -0,0 +1,313 @@ +package anypoint + +import ( + "context" + "errors" + "fmt" + "io/ioutil" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + connApp "github.com/mulesoft-consulting/anypoint-client-go/connected_app" +) + +func dataSourceConnectedApp() *schema.Resource { + return &schema.Resource{ + ReadContext: dataSourceConnectedAppRead, + Description: ` + Reads all ` + "`" + `connected apps` + "`" + ` in your organization. + `, + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + Description: "The unique id of this connected app generated by the anypoint platform.", + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: "The name of the connected app.", + }, + "secret": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + Description: "The secret of the connected app.", + }, + "user_id": { + Type: schema.TypeString, + Computed: true, + Description: "The id of the user who owns the connected app", + }, + "organization_id": { + Type: schema.TypeString, + Computed: true, + Description: "The organization id where the connected app's owner is defined.", + }, + "grant_types": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: ` + List of grant types. For "on its own behalf" connected apps the only allowed value is "client_credentials". + The allowed values for "on behalf of user" connected apps are: "authorization_code", "refresh_token", + "password", and "urn:ietf:params:oauth:grant-type:jwt-bearer". + `, + }, + "redirect_uris": { + Description: "Configure which URIs users may be directed to after authorization", + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "scope": { + Description: "The scopes this connected app has authorization to work on", + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope": { + Type: schema.TypeString, + Computed: true, + Description: "Scope", + }, + "org_id": { + Type: schema.TypeString, + Computed: true, + Description: "The id of the business group the scope is valid. Only required for particular scopes", + }, + "env_id": { + Type: schema.TypeString, + Computed: true, + Description: "The id of the environment the scope is valid. Only required for particular scopes", + }, + }, + }, + }, + "public_keys": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: ` + Application public key (PEM format). Used to validate JWT authorization grants. + Required when grant type jwt-bearer is selected. + `, + }, + "client_uri": { + Type: schema.TypeString, + Computed: true, + Description: ` + Users can visit this URL to learn more about your app. Required for "on behalf of user" + connected apps + `, + }, + "enabled": { + Type: schema.TypeBool, + Computed: true, + Description: "True if the connected app is enabled", + }, + "audience": { + Type: schema.TypeString, + Computed: true, + Description: "Who can use this application", + }, + "policy_uri": { + Type: schema.TypeString, + Computed: true, + }, + "tos_uri": { + Type: schema.TypeString, + Computed: true, + }, + "cert_expiry": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceConnectedAppRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + // Warning or errors can be collected in a slice type + var diags diag.Diagnostics + pco := m.(ProviderConfOutput) + connappid := d.Get("id").(string) + authctx := getConnectedAppAuthCtx(ctx, &pco) + + //request connected app + res, httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdGet(authctx, connappid).Execute() + defer httpr.Body.Close() + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Get connected app", + Detail: details, + }) + return diags + } + + //process data + connappinstance := flattenConnectedAppData(&res) + + // Is it a "on behalf of user" connected apps? + if granttypes := connappinstance["grant_types"]; granttypes != nil && StringInSlice(granttypes.([]string), "client_credentials", true) { + // Yes, then load the scopes using connapps/{connapp_id}/scopes + if scopes, error := readScopesByConnectedAppId(authctx, connappid, m); error != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Get connected app scopes", + Detail: err.Error(), + }) + return diags + } else { + connappinstance["scope"] = scopes + } + } + + //save in data source schema + if err := setConnectedAppAttributesToResourceData(d, connappinstance); err != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to set Connected App", + Detail: err.Error(), + }) + return diags + } + + d.SetId(connappid) + + return diags +} + +func readScopesByConnectedAppId(ctx context.Context, connappid string, m interface{}) ([]interface{}, error) { + pco := m.(ProviderConfOutput) + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + res, httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdScopesGet(authctx, connappid).Execute() + + defer httpr.Body.Close() + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + + return nil, errors.New(details) + } + + //process data + return flattenConnectedAppScopesData(&res), nil +} + +/* +* Copies the given connected app instance into the given resource data +* @param d *schema.ResourceData the resource data schema +* @param connappitem map[string]interface{} the connected app instance + */ +func setConnectedAppAttributesToResourceData(d *schema.ResourceData, connappitem map[string]interface{}) error { + attributes := getConnectedAppAttributes() + if connappitem != nil { + for _, attr := range attributes { + if err := d.Set(attr, connappitem[attr]); err != nil { + return fmt.Errorf("unable to set Connected App attribute %s\n details: %s", attr, err) + } + } + } + return nil +} + +/* +* Transforms a connApp.ConnectedAppRespExt object to the dataSourceConnectedApp schema +* @param connappitem *connApp.ConnectedAppRespExt the connected app struct +* @return the connected app mapped struct + */ +func flattenConnectedAppData(connappitem *connApp.ConnectedAppRespExt) map[string]interface{} { + if connappitem != nil { + item := make(map[string]interface{}) + + // connApp.ConnectedAppCore attributes + item["name"] = connappitem.GetClientName() + item["grant_types"] = connappitem.GetGrantTypes() + item["public_keys"] = connappitem.GetPublicKeys() + item["redirect_uris"] = connappitem.GetRedirectUris() + item["client_uri"] = connappitem.GetClientUri() + item["audience"] = connappitem.GetAudience() + + scopes := make([]interface{}, len(connappitem.GetScopes())) + for j, scope := range connappitem.GetScopes() { + s := make(map[string]interface{}) + + s["scope"] = scope + + scopes[j] = s + } + item["scope"] = scopes + + // connApp.ConnectedAppRespExt extra attributes + item["id"] = connappitem.GetClientId() + item["secret"] = connappitem.GetClientSecret() + item["organization_id"] = connappitem.GetOwnerOrgId() + item["user_id"] = connappitem.GetOwnerUserId() + item["enabled"] = connappitem.GetEnabled() + item["policy_uri"] = connappitem.GetPolicyUri() + item["tos_uri"] = connappitem.GetTosUri() + item["cert_expiry"] = connappitem.GetCertExpiry() + + return item + } + + return nil +} + +func flattenConnectedAppScopesData(scopes *connApp.InlineResponse2001) []interface{} { + if scopes != nil { + scopes_list := make([]interface{}, len(scopes.GetData())) + + for j, scope := range scopes.GetData() { + s := make(map[string]interface{}) + + s["scope"] = scope.GetScope() + + if contextparams, ok := scope.GetContextParamsOk(); ok { + if org_id, org_ok := contextparams.GetOrgOk(); org_ok { + s["org_id"] = org_id + } + + if env_id, env_ok := contextparams.GetEnvIdOk(); env_ok { + s["env_id"] = env_id + } + } + + scopes_list[j] = s + } + + return scopes_list + } + + return nil +} + +func getConnectedAppAttributes() []string { + attributes := [...]string{ + "id", "name", "secret", "organization_id", "user_id", "grant_types", "redirect_uris", + "scope", "public_keys", "client_uri", "enabled", "audience", "policy_uri", "tos_uri", "cert_expiry", + } + return attributes[:] +} diff --git a/anypoint/data_source_env.go b/anypoint/data_source_env.go index 51b950f..04f35c3 100644 --- a/anypoint/data_source_env.go +++ b/anypoint/data_source_env.go @@ -27,11 +27,6 @@ func dataSourceENV() *schema.Resource { Required: true, Description: "The organization id where the environment is defined.", }, - "organization_id": { - Type: schema.TypeString, - Computed: true, - Description: "The organization id where the environment is defined.", - }, "name": { Type: schema.TypeString, Computed: true, @@ -126,7 +121,7 @@ func flattenENVData(envitem *env.Env) map[string]interface{} { item["id"] = envitem.GetId() item["name"] = envitem.GetName() - item["organization_id"] = envitem.GetOrganizationId() + item["org_id"] = envitem.GetOrganizationId() item["is_production"] = envitem.GetIsProduction() item["type"] = envitem.GetType() item["client_id"] = envitem.GetClientId() @@ -139,7 +134,7 @@ func flattenENVData(envitem *env.Env) map[string]interface{} { func getENVCoreAttributes() []string { attributes := [...]string{ - "name", "organization_id", "is_production", "type", "client_id", + "name", "org_id", "is_production", "type", "client_id", } return attributes[:] } diff --git a/anypoint/provider.go b/anypoint/provider.go index 50efafe..8903c84 100644 --- a/anypoint/provider.go +++ b/anypoint/provider.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" auth "github.com/mulesoft-consulting/anypoint-client-go/authorization" + connected_app "github.com/mulesoft-consulting/anypoint-client-go/connected_app" dlb "github.com/mulesoft-consulting/anypoint-client-go/dlb" env "github.com/mulesoft-consulting/anypoint-client-go/env" idp "github.com/mulesoft-consulting/anypoint-client-go/idp" @@ -43,6 +44,13 @@ func Provider() *schema.Provider { DefaultFunc: schema.EnvDefaultFunc("ANYPOINT_CLIENT_SECRET", nil), Description: "the connected app's secret", }, + "access_token": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + DefaultFunc: schema.EnvDefaultFunc("ANYPOINT_ACCESS_TOKEN", nil), + Description: "the connected app's access token", + }, "username": { Type: schema.TypeString, Optional: true, @@ -63,7 +71,7 @@ func Provider() *schema.Provider { DefaultFunc: schema.EnvDefaultFunc("ANYPOINT_CPLANE", "us"), ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { v := val.(string) - if v != "us" && v != "eu" { + if v != "us" && v != "eu" && v != "gov" { errs = append(errs, fmt.Errorf("%q must be 'eu‘ or 'us', got: %s", key, v)) } return @@ -87,6 +95,7 @@ func Provider() *schema.Provider { "anypoint_dlb": resourceDLB(), "anypoint_idp_oidc": resourceOIDC(), "anypoint_idp_saml": resourceSAML(), + "anypoint_connected_app": resourceConnectedApp(), }, DataSourcesMap: map[string]*schema.Resource{ "anypoint_vpcs": dataSourceVPCs(), @@ -110,6 +119,7 @@ func Provider() *schema.Provider { "anypoint_dlbs": dataSourceDLBs(), "anypoint_idp": dataSourceIDP(), "anypoint_idps": dataSourceIDPs(), + "anypoint_connected_app": dataSourceConnectedApp(), }, ConfigureContextFunc: providerConfigure, TerraformVersion: "v1.0.1", @@ -122,6 +132,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData) (interface{} client_id := d.Get("client_id").(string) client_secret := d.Get("client_secret").(string) + access_token := d.Get("access_token").(string) username := d.Get("username").(string) password := d.Get("password").(string) cplane := d.Get("cplane").(string) @@ -129,6 +140,10 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData) (interface{} server_index := cplane2serverindex(cplane) auth_ctx := context.WithValue(ctx, auth.ContextServerIndex, server_index) + if (access_token != ""){ + return newProviderConfOutput(access_token, server_index), diags + } + if (username != "") && (password != "") { authres, d := userPwdAuth(auth_ctx, username, password) if d != nil { @@ -150,7 +165,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData) (interface{} } /* - Authenticates a user using username and password +Authenticates a user using username and password */ func userPwdAuth(ctx context.Context, username string, password string) (*auth.InlineResponse2001, diag.Diagnostics) { var diags diag.Diagnostics @@ -181,7 +196,7 @@ func userPwdAuth(ctx context.Context, username string, password string) (*auth.I } /* - Authenticates a connected app +Authenticates a connected app */ func connectedAppAuth(ctx context.Context, client_id string, client_secret string) (*auth.InlineResponse200, diag.Diagnostics) { var diags diag.Diagnostics @@ -212,14 +227,16 @@ func connectedAppAuth(ctx context.Context, client_id string, client_secret strin } /* - returns the server index depending on the control plane name - if the control plane is not recognized, returns -1 +returns the server index depending on the control plane name +if the control plane is not recognized, returns -1 */ func cplane2serverindex(cplane string) int { if cplane == "eu" { return 1 } else if cplane == "us" { return 0 + } else if cplane == "gov" { + return 2 } return -1 } @@ -241,6 +258,7 @@ type ProviderConfOutput struct { teamgroupmappingsclient *team_group_mappings.APIClient dlbclient *dlb.APIClient idpclient *idp.APIClient + connectedappclient *connected_app.APIClient } func newProviderConfOutput(access_token string, server_index int) ProviderConfOutput { @@ -259,6 +277,7 @@ func newProviderConfOutput(access_token string, server_index int) ProviderConfOu teamgroupmappingscfg := team_group_mappings.NewConfiguration() dlbcfg := dlb.NewConfiguration() idpcfg := idp.NewConfiguration() + connectedappcfg := connected_app.NewConfiguration() vpcclient := vpc.NewAPIClient(vpccfg) vpnclient := vpn.NewAPIClient(vpncfg) @@ -274,6 +293,7 @@ func newProviderConfOutput(access_token string, server_index int) ProviderConfOu teamgroupmappingsclient := team_group_mappings.NewAPIClient(teamgroupmappingscfg) dlbclient := dlb.NewAPIClient(dlbcfg) idpclient := idp.NewAPIClient(idpcfg) + connectedappclient := connected_app.NewAPIClient(connectedappcfg) return ProviderConfOutput{ access_token: access_token, @@ -292,5 +312,6 @@ func newProviderConfOutput(access_token string, server_index int) ProviderConfOu teamgroupmappingsclient: teamgroupmappingsclient, dlbclient: dlbclient, idpclient: idpclient, + connectedappclient: connectedappclient, } } diff --git a/anypoint/resource_connected_app.go b/anypoint/resource_connected_app.go new file mode 100644 index 0000000..b7ddaa3 --- /dev/null +++ b/anypoint/resource_connected_app.go @@ -0,0 +1,653 @@ +package anypoint + +import ( + "context" + "errors" + "io/ioutil" + "sort" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + connApp "github.com/mulesoft-consulting/anypoint-client-go/connected_app" +) + +func resourceConnectedApp() *schema.Resource { + return &schema.Resource{ + CreateContext: resourceConnectedAppCreate, + ReadContext: resourceConnectedAppRead, + UpdateContext: resourceConnectedAppUpdate, + DeleteContext: resourceConnectedAppDelete, + Description: ` + Creates a ` + "`" + `connected app` + "`" + `. + `, + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + Description: "The unique id of this connected app generated by the anypoint platform.", + }, + "name": { + Type: schema.TypeString, + Required: true, + Description: "The name of the connected app.", + }, + "secret": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + Description: "The secret of the connected app.", + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if new == "" { + return true + } else { + return old == new + } + }, + }, + "user_id": { + Type: schema.TypeString, + Computed: true, + Description: "The id of the user who owns the connected app", + }, + "organization_id": { + Type: schema.TypeString, + Computed: true, + ForceNew: true, + Description: "The organization id where the connected app's owner is defined.", + }, + "grant_types": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalStrList(d.GetChange("grant_types")) + }, + Description: ` + List of grant types. For "on its own behalf" connected apps the only allowed value is "client_credentials". + The allowed values for "on behalf of user" connected apps are: "authorization_code", "refresh_token", + "password", and "urn:ietf:params:oauth:grant-type:jwt-bearer". + `, + }, + "redirect_uris": { + Description: "Configure which URIs users may be directed to after authorization", + Type: schema.TypeList, + Optional: true, + DefaultFunc: func() (interface{}, error) { + return make([]string, 0), nil + }, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalStrList(d.GetChange("redirect_uris")) + }, + }, + "scope": { + Description: "The scopes this connected app has authorization to work on", + Type: schema.TypeList, + Optional: true, + DefaultFunc: func() (interface{}, error) { + return make([]interface{}, 0), nil + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalsConnectedAppScopes(d.GetChange("scope")) + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope": { + Type: schema.TypeString, + Required: true, + Description: "Scope", + }, + "org_id": { + Type: schema.TypeString, + Optional: true, + Description: "The id of the business group the scope is valid. Only required for particular scopes", + }, + "env_id": { + Type: schema.TypeString, + Optional: true, + Description: "The id of the environment the scope is valid. Only required for particular scopes", + }, + }, + }, + }, + "public_keys": { + Type: schema.TypeList, + Optional: true, + DefaultFunc: func() (interface{}, error) { + return make([]string, 0), nil + }, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: ` + Application public key (PEM format). Used to validate JWT authorization grants. + Required when grant type jwt-bearer is selected. + `, + }, + "client_uri": { + Type: schema.TypeString, + Optional: true, + Description: ` + Users can visit this URL to learn more about your app. Required for "on behalf of user" + connected apps + `, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + Description: "True if the connected app is enabled", + }, + "audience": { + Type: schema.TypeString, + Required: true, + Description: "Who can use this application", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"internal", "everyone"}, true)), + }, + "policy_uri": { + Type: schema.TypeString, + Computed: true, + }, + "tos_uri": { + Type: schema.TypeString, + Computed: true, + }, + "cert_expiry": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceConnectedAppCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + // Warning or errors can be collected in a slice type + var diags diag.Diagnostics + pco := m.(ProviderConfOutput) + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + body := newConnectedAppPostBody(d) + + //request connected app creation + res, httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsPost(authctx).ConnectedAppCore(*body).Execute() + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Create Connected App", + Detail: details, + }) + return diags + } + defer httpr.Body.Close() + + d.SetId(res.GetClientId()) + + // Is it a "on its own behalf" connected apps? + if grant_types, ok := body.GetGrantTypesOk(); ok && StringInSlice(*grant_types, "client_credentials", true) { + + // Are there scopes to be saved? + if scopes := d.Get("scope"); scopes != nil && len(scopes.([]interface{})) > 0 { + + // Save the connected app scopes + if error := replaceConnectedAppScopes(authctx, d, m); error != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Create Connected App Scopes", + Detail: error.Error(), + }) + return diags + } + } + } + + resourceConnectedAppRead(ctx, d, m) + + return diags +} + +func resourceConnectedAppRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + // Warning or errors can be collected in a slice type + var diags diag.Diagnostics + pco := m.(ProviderConfOutput) + connappid := d.Id() + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + res, httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdGet(authctx, connappid).Execute() + + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Get Connected App", + Detail: details, + }) + return diags + } + + //process data + connappinstance := flattenConnectedAppData(&res) + + // Is it a "on behalf of user" connected apps? + if granttypes := connappinstance["grant_types"]; granttypes != nil && StringInSlice(granttypes.([]string), "client_credentials", true) { + // Yes, then load the scopes using connapps/{connapp_id}/scopes + if scopes, error := readScopesByConnectedAppId(authctx, connappid, m); error != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Get connected app scopes", + Detail: err.Error(), + }) + return diags + } else { + connappinstance["scope"] = scopes + } + } + + //save in data source schema + if err := setConnectedAppAttributesToResourceData(d, connappinstance); err != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to set Connected App", + Detail: err.Error(), + }) + return diags + } + + return diags +} + +func resourceConnectedAppUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + var diags diag.Diagnostics + pco := m.(ProviderConfOutput) + connappid := d.Id() + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + if d.HasChanges(getConnectedAppAttributes()...) { + body := newConnectedAppPatchBody(d) + //request env creation + _, httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdPatch(authctx, connappid).ConnectedAppPatchExt(*body).Execute() + + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Update Connected App", + Detail: details, + }) + return diags + } + defer httpr.Body.Close() + + // Is it a "on its own behalf" connected apps? + if grant_types, ok := body.GetGrantTypesOk(); ok && StringInSlice(*grant_types, "client_credentials", true) { + + // Are there scopes to be saved? + if scopes := d.Get("scope"); scopes != nil && len(scopes.([]interface{})) > 0 { + + // Save the connected app scopes + if error := replaceConnectedAppScopes(authctx, d, m); error != nil { + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Create Connected App Scopes", + Detail: error.Error(), + }) + return diags + } + } + } + } + + return resourceConnectedAppRead(ctx, d, m) +} + +func resourceConnectedAppDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + // Warning or errors can be collected in a slice type + var diags diag.Diagnostics + pco := m.(ProviderConfOutput) + connappid := d.Id() + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdDelete(authctx, connappid).Execute() + + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + diags := append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Unable to Delete Connected App", + Detail: details, + }) + return diags + } + defer httpr.Body.Close() + // d.SetId("") is automatically called assuming delete returns no errors, but + // it is added here for explicitness. + d.SetId("") + + return diags +} + +func replaceConnectedAppScopes(ctx context.Context, d *schema.ResourceData, m interface{}) error { + pco := m.(ProviderConfOutput) + connappid := d.Id() + + authctx := getConnectedAppAuthCtx(ctx, &pco) + + body := newConnectedAppScopesPutBody(d) + + //request scopes replacement + httpr, err := pco.connectedappclient.DefaultApi.ConnectedApplicationsConnAppIdScopesPut(authctx, connappid).ConnectedAppScopesPutBody(*body).Execute() + + if err != nil { + var details string + if httpr != nil { + b, _ := ioutil.ReadAll(httpr.Body) + details = string(b) + } else { + details = err.Error() + } + + return errors.New(details) + } + defer httpr.Body.Close() + + return nil +} + +func newConnectedAppScopesPutBody(d *schema.ResourceData) *connApp.ConnectedAppScopesPutBody { + body := connApp.NewConnectedAppScopesPutBodyWithDefaults() + + // Is there any scope set in the resource? + if scopes := d.Get("scope"); scopes != nil { + scopes_list := scopes.([]interface{}) + + scopes_body := make([]connApp.ScopeCore, len(scopes_list)) + + for i, scope := range scopes_list { + scope_map := scope.(map[string]interface{}) + + scope_core := connApp.NewScopeCoreWithDefaults() + + if val, ok := scope_map["scope"]; ok { + scope_core.SetScope(val.(string)) + } + + context_params := connApp.NewContextParamsWithDefaults() + + if org_id, ok := scope_map["org_id"]; ok && org_id != "" { + context_params.SetOrg(org_id.(string)) + } + + if env_id, ok := scope_map["env_id"]; ok && env_id != "" { + context_params.SetEnvId(env_id.(string)) + } + + scope_core.SetContextParams(*context_params) + + scopes_body[i] = *scope_core + } + + body.SetScopes(scopes_body) + } + + return body +} + +/* + * Creates a new connected app Core Struct from the resource data schema + */ +func newConnectedAppPostBody(d *schema.ResourceData) *connApp.ConnectedAppCore { + body := connApp.NewConnectedAppCoreWithDefaults() + + // connApp.ConnectedAppCore attributes + body.SetClientName(d.Get("name").(string)) + body.SetGrantTypes(ListInterface2ListStrings(d.Get("grant_types").([]interface{}))) + body.SetAudience(d.Get("audience").(string)) + + // Required by Anypoint endpoint, but value can be an empty list + if publickeys, ok := d.GetOk("public_keys"); ok { + body.SetPublicKeys(ListInterface2ListStrings(publickeys.([]interface{}))) + } else { + body.SetPublicKeys(make([]string, 0)) + } + + // Required by Anypoint endpoint, but value can be an empty list + if redirecturis, ok := d.GetOk("redirect_uris"); ok { + body.SetRedirectUris(ListInterface2ListStrings(redirecturis.([]interface{}))) + } else { + body.SetRedirectUris(make([]string, 0)) + } + + // Is it a "on behalf of user" connected apps? + if grant_types, ok := body.GetGrantTypesOk(); ok && !StringInSlice(*grant_types, "client_credentials", true) { + + // Is there any scope set in the resource? + if scopes := d.Get("scope"); scopes != nil { + scopes_list := scopes.([]interface{}) + + scopes_body := make([]string, len(scopes_list)) + + for i, scope := range scopes_list { + scope_map := scope.(map[string]interface{}) + + if val := scope_map["scope"]; val != nil { + scopes_body[i] = val.(string) + } + } + + body.SetScopes(scopes_body) + } + } else { + body.SetScopes(make([]string, 0)) + } + + if clienturi, ok := d.GetOk("client_uri"); ok { + body.SetClientUri(clienturi.(string)) + } + + return body +} + +/* + * Creates a new connected app patch Struct from the resource data schema + */ +func newConnectedAppPatchBody(d *schema.ResourceData) *connApp.ConnectedAppPatchExt { + body := connApp.NewConnectedAppPatchExtWithDefaults() + + // connApp.ConnectedAppCore attributes + body.SetClientName(d.Get("name").(string)) + body.SetGrantTypes(ListInterface2ListStrings(d.Get("grant_types").([]interface{}))) + body.SetAudience(d.Get("audience").(string)) + + // Required by Anypoint endpoint, but value can be an empty list + if publickeys, ok := d.GetOk("public_keys"); ok { + body.SetPublicKeys(ListInterface2ListStrings(publickeys.([]interface{}))) + } else { + body.SetPublicKeys(make([]string, 0)) + } + + // Required by Anypoint endpoint, but value can be an empty list + if redirecturis, ok := d.GetOk("redirect_uris"); ok { + body.SetRedirectUris(ListInterface2ListStrings(redirecturis.([]interface{}))) + } else { + body.SetRedirectUris(make([]string, 0)) + } + + // Is it a "on behalf of user" connected apps? + if val, ok := body.GetGrantTypesOk(); ok && !StringInSlice(*val, "client_credentials", true) { + + // Is there any scope set in the resource? + if scopes := d.Get("scope"); scopes != nil { + scopes_list := scopes.([]interface{}) + + scopes_body := make([]string, len(scopes_list)) + + for i, scope := range scopes_list { + scope_map := scope.(map[string]interface{}) + + if val, ok := scope_map["scope"]; ok { + scopes_body[i] = val.(string) + } + } + + body.SetScopes(scopes_body) + } + } else { + body.SetScopes(make([]string, 0)) + } + + if clienturi, ok := d.GetOk("client_uri"); ok { + body.SetClientUri(clienturi.(string)) + } + + // connApp.ConnectedAppPatchExt extra attributes + if secret, ok := d.GetOk("secret"); ok { + body.SetClientSecret(secret.(string)) + } + + if enabled, ok := d.GetOk("enabled"); ok { + body.SetEnabled(enabled.(bool)) + } + + return body +} + +// Compares 2 scopes lists +// returns true if they are the same, false otherwise +func equalsConnectedAppScopes(old, new interface{}) bool { + old_list := old.([]interface{}) + new_list := new.([]interface{}) + + old_list = removeProfileScope(old_list) + new_list = removeProfileScope(new_list) + + if len(new_list) != len(old_list) { + return false + } + + if len(new_list) == 0 { + return true + } + + sortScopes(old_list) + sortScopes(new_list) + + for i, val := range old_list { + o := val.(map[string]interface{}) + n := new_list[i].(map[string]interface{}) + + old_scope := o["scope"].(string) + new_scope := n["scope"].(string) + + if old_scope != new_scope { + return false + } + + old_org_id := o["org_id"] + new_org_id := n["org_id"] + + if old_org_id != new_org_id { + return false + } + + old_env_id := o["env_id"] + new_env_id := n["env_id"] + + if old_env_id != new_env_id { + return false + } + } + + return true +} + +// "Profile" is a defaul scope added to "act on its own behalf" connected apps. +// It should not be considered when dealing with this kind of connecte app +func removeProfileScope(scopes []interface{}) []interface{} { + if len(scopes) == 0 { + return scopes + } + + for i, scope := range scopes { + scope_map := scope.(map[string]interface{}) + + if strings.EqualFold(scope_map["scope"].(string), "profile") { + scopes[i] = scopes[len(scopes)-1] + return scopes[:len(scopes)-1] + } + } + + return scopes +} + +func sortScopes(list []interface{}) { + sort.SliceStable(list, func(i, j int) bool { + i_elem := list[i].(map[string]interface{}) + j_elem := list[j].(map[string]interface{}) + + i_scope := i_elem["scope"].(string) + j_scope := j_elem["scope"].(string) + + if i_scope != j_scope { + return i_scope < j_scope + } + + i_org_id := i_elem["org_id"].(string) + j_org_id := j_elem["org_id"].(string) + + if i_org_id != j_org_id { + return i_org_id < j_org_id + } + + i_env_id := i_elem["env_id"].(string) + j_env_id := j_elem["env_id"].(string) + + if i_env_id != j_env_id { + return i_env_id < j_env_id + } + + return true + }) +} + +/* + * Returns authentication context (includes authorization header) + */ +func getConnectedAppAuthCtx(ctx context.Context, pco *ProviderConfOutput) context.Context { + tmp := context.WithValue(ctx, connApp.ContextAccessToken, pco.access_token) + return context.WithValue(tmp, connApp.ContextServerIndex, pco.server_index) +} diff --git a/anypoint/resource_dlb.go b/anypoint/resource_dlb.go index 4980282..4f7abcd 100644 --- a/anypoint/resource_dlb.go +++ b/anypoint/resource_dlb.go @@ -635,7 +635,7 @@ func compareDLBStates(old, new string) bool { return false } -//Returns authentication context (includes authorization header) +// Returns authentication context (includes authorization header) func getDLBAuthCtx(ctx context.Context, pco *ProviderConfOutput) context.Context { tmp := context.WithValue(ctx, dlb.ContextAccessToken, pco.access_token) return context.WithValue(tmp, dlb.ContextServerIndex, pco.server_index) @@ -655,9 +655,9 @@ func equalDLBSSLEndpoints(old, new interface{}) bool { new_set := new.(*schema.Set) new_list := new_set.List() - sortAttr := "private_key_label" - sortMapListAl(new_list, sortAttr) - sortMapListAl(old_list, sortAttr) + sortAttr := []string{"private_key_label"} + SortMapListAl(new_list, sortAttr) + SortMapListAl(old_list, sortAttr) if len(new_list) != len(old_list) { return false @@ -689,9 +689,9 @@ func equalDLBSSLEndpoints(old, new interface{}) bool { // compares two SSL Endpoint Mappings // returns true if they are equal, false otherwise func equalDLBSSLEndpointsMappings(old, new []interface{}) bool { - sortAttr := "app_uri" - sortMapListAl(old, sortAttr) - sortMapListAl(new, sortAttr) + sortAttr := []string{"app_uri"} + SortMapListAl(old, sortAttr) + SortMapListAl(new, sortAttr) attributes := [...]string{ "input_uri", "app_name", "app_uri", @@ -714,8 +714,8 @@ func equalDLBSSLEndpointsMappings(old, new []interface{}) bool { return true } -//Compares old and new values of allow list attribute -//returns true if they are the same, false otherwise +// Compares old and new values of allow list attribute +// returns true if they are the same, false otherwise func equalDLBAllowList(old, new interface{}) bool { old_list := old.([]interface{}) new_list := new.([]interface{}) @@ -729,7 +729,7 @@ func equalDLBAllowList(old, new interface{}) bool { return true } -//returns true if the DLB key elements have been changed +// returns true if the DLB key elements have been changed func isDLBChanged(ctx context.Context, d *schema.ResourceData, m interface{}) bool { watchAttrs := getDLBPatchWatchAttributes() diff --git a/anypoint/resource_env.go b/anypoint/resource_env.go index 66bc0db..5ecef9f 100644 --- a/anypoint/resource_env.go +++ b/anypoint/resource_env.go @@ -36,37 +36,30 @@ func resourceENV() *schema.Resource { "org_id": { Type: schema.TypeString, Required: true, - Description: "The organization id where the environment is defined.", - }, - "organization_id": { - Type: schema.TypeString, - Computed: true, + ForceNew: true, Description: "The organization id where the environment is defined.", }, "name": { Type: schema.TypeString, Required: true, - ForceNew: true, Description: "The name of the environment", }, "is_production": { Type: schema.TypeBool, - Optional: true, - ForceNew: true, + Computed: true, Description: "True if the environment is a production environment", }, "type": { Type: schema.TypeString, Required: true, + ForceNew: true, Description: "The type of the environment: sandbox or production", - ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"sandbox", "production"}, true)), + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"sandbox", "design", "production"}, true)), }, "client_id": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return DiffSuppressFunc4OptionalPrimitives(k, old, new, d, "") - }, + Type: schema.TypeString, + Computed: true, + Description: "The environment client id", }, }, } @@ -235,6 +228,7 @@ func newENVPutBody(d *schema.ResourceData) *env.EnvCore { body := env.NewEnvCoreWithDefaults() body.SetName(d.Get("name").(string)) + return body } diff --git a/anypoint/resource_team.go b/anypoint/resource_team.go index fad117c..a474dd6 100644 --- a/anypoint/resource_team.go +++ b/anypoint/resource_team.go @@ -68,7 +68,7 @@ func resourceTeam() *schema.Resource { }, "ancestor_team_ids": { Type: schema.TypeList, - Optional: true, + Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -303,7 +303,7 @@ func getTeamPatchWatchAttributes() []string { } /* - List of attributes that requires to use put operation (to move team from one parent to another) +List of attributes that requires to use put operation (to move team from one parent to another) */ func getTeamPutWatchAttributes() []string { attributes := [...]string{ diff --git a/anypoint/resource_team_groupmappings.go b/anypoint/resource_team_groupmappings.go index 5bd5f47..dfa0eda 100644 --- a/anypoint/resource_team_groupmappings.go +++ b/anypoint/resource_team_groupmappings.go @@ -51,6 +51,9 @@ func resourceTeamGroupMappings() *schema.Resource { Required: true, ForceNew: true, Description: "The list of external identity provider groups that should be mapped to the given team.", + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalTeamGroupMappings(d.GetChange("groupmappings")) + }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "external_group_name": { @@ -250,12 +253,50 @@ func newTeamGroupMappingsPutBody(d *schema.ResourceData) []map[string]interface{ item := make(map[string]interface{}) item["membership_type"] = content["membership_type"] item["external_group_name"] = content["external_group_name"] + if val, ok := content["provider_id"]; ok { + item["provider_id"] = val + } body[i] = item } return body } +// Compares old and new values of group mappings +// returns true if they are the same, false otherwise +func equalTeamGroupMappings(old, new interface{}) bool { + old_list := old.([]interface{}) + new_list := new.([]interface{}) + sortAttrs := []string{"membership_type", "external_group_name", "provider_id"} + SortMapListAl(old_list, sortAttrs) + SortMapListAl(new_list, sortAttrs) + if len(old_list) != len(new_list) { + return false + } + for i := range old_list { + if !equalTeamGroupMapping(old_list[i], new_list[i]) { + return false + } + } + return true +} + +// compares 2 single group mappings +func equalTeamGroupMapping(old, new interface{}) bool { + old_role := old.(map[string]interface{}) + new_role := new.(map[string]interface{}) + + keys := []string{"membership_type", "external_group_name", "provider_id"} + + for _, k := range keys { + if old_role[k].(string) != new_role[k].(string) { + return false + } + } + + return true +} + /* * Returns authentication context (includes authorization header) */ diff --git a/anypoint/resource_team_roles.go b/anypoint/resource_team_roles.go index ba0e5d7..d06a208 100644 --- a/anypoint/resource_team_roles.go +++ b/anypoint/resource_team_roles.go @@ -3,6 +3,7 @@ package anypoint import ( "context" "io/ioutil" + "sort" "strings" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -10,6 +11,8 @@ import ( team_roles "github.com/mulesoft-consulting/anypoint-client-go/team_roles" ) +const BG_VIEWER_ROLE = "833ab9ca-0c72-45ba-9764-1df83240db57" + func resourceTeamRoles() *schema.Resource { return &schema.Resource{ CreateContext: resourceTeamRolesCreate, @@ -25,7 +28,6 @@ Depending on the ` + "`" + `role` + "`" + `, some roles are environment scoped o Schema: map[string]*schema.Schema{ "last_updated": { Type: schema.TypeString, - Optional: true, Computed: true, Description: "The last time this resource has been updated locally.", }, @@ -47,9 +49,12 @@ Depending on the ` + "`" + `role` + "`" + `, some roles are environment scoped o Description: "The master organization id where the team is defined.", }, "roles": { - Type: schema.TypeList, - Required: true, - ForceNew: true, + Type: schema.TypeList, + Required: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalTeamRoles(d.GetChange("roles")) + }, Description: "The roles (permissions) of the team.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -236,7 +241,7 @@ func newTeamRolesDeleteBody(d *schema.ResourceData) []map[string]interface{} { for _, role := range roles { content := role.(map[string]interface{}) - if content["role_id"] == "833ab9ca-0c72-45ba-9764-1df83240db57" { // It is forbidden to remove the Business Group Viewer role + if content["role_id"] == BG_VIEWER_ROLE { // It is forbidden to remove the Business Group Viewer role continue } item := make(map[string]interface{}) @@ -248,6 +253,90 @@ func newTeamRolesDeleteBody(d *schema.ResourceData) []map[string]interface{} { return body } +// Compares old and new values of roles +// returns true if they are the same, false otherwise +func equalTeamRoles(old, new interface{}) bool { + old_list := old.([]interface{}) + new_list := new.([]interface{}) + old_list = FilterMapList(old_list, rolesSkipFilter) + new_list = FilterMapList(new_list, rolesSkipFilter) + sortMapListRoles(old_list) + sortMapListRoles(new_list) + if len(old_list) != len(new_list) { + return false + } + for i := range old_list { + if !equalTeamRole(old_list[i], new_list[i]) { + return false + } + } + return true +} + +// compares 2 singles roles +func equalTeamRole(old, new interface{}) bool { + old_role := old.(map[string]interface{}) + new_role := new.(map[string]interface{}) + + ridkey := "role_id" + cparamskey := "context_params" + + if old_role[ridkey].(string) != new_role[ridkey].(string) { + return false + } + if !equalTeamRoleContextParams(old_role[cparamskey], new_role[cparamskey]) { + return false + } + return true +} + +// compares 2 role contexts +func equalTeamRoleContextParams(old, new interface{}) bool { + old_cparams := old.(map[string]interface{}) + new_cparams := new.(map[string]interface{}) + for k := range old_cparams { + if old_cparams[k].(string) != new_cparams[k].(string) { + return false + } + } + return true +} + +// filter for roles to skip when attempting to calculate the diffin +// the role ids in this function are automatically added when a team is created. Therefore should be skipped +func rolesSkipFilter(item map[string]interface{}) bool { + skip := []string{BG_VIEWER_ROLE} + ridkey := "role_id" + return !StringInSlice(skip, item[ridkey].(string), false) +} + +// sorts a list of roles by role_id, org, envId +func sortMapListRoles(roles []interface{}) { + sort.SliceStable(roles, func(i, j int) bool { + i_elem := roles[i].(map[string]interface{}) + j_elem := roles[j].(map[string]interface{}) + + sortAttrA := "role_id" + sortAttrB := "context_params" + if i_elem[sortAttrA].(string) != j_elem[sortAttrA].(string) { + return i_elem[sortAttrA].(string) < j_elem[sortAttrA].(string) + } + + sortAttrC := "org" + sortAttrD := "envId" + i_context := i_elem[sortAttrB].(map[string]interface{}) + j_context := j_elem[sortAttrB].(map[string]interface{}) + if i_context[sortAttrC].(string) != j_context[sortAttrC].(string) { + return i_context[sortAttrC].(string) < j_context[sortAttrC].(string) + } + if i_context[sortAttrD] != nil && j_context[sortAttrD] != nil && i_context[sortAttrD].(string) != j_context[sortAttrD].(string) { + return i_context[sortAttrD].(string) < j_context[sortAttrD].(string) + } + + return true + }) +} + /* * Returns authentication context (includes authorization header) */ diff --git a/anypoint/resource_vpc.go b/anypoint/resource_vpc.go index 79ce9bf..845c518 100644 --- a/anypoint/resource_vpc.go +++ b/anypoint/resource_vpc.go @@ -3,6 +3,7 @@ package anypoint import ( "context" "io/ioutil" + "sort" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -111,6 +112,9 @@ func resourceVPC() *schema.Resource { Type: schema.TypeList, Optional: true, Description: "Inbound firewall rules for all CloudHub workers in this vpc. The list is allow only with an implicit deny all if no rules match", + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return equalsVPCFirewallRules(d.GetChange("firewall_rules")) + }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cidr_block": { @@ -138,7 +142,7 @@ func resourceVPC() *schema.Resource { }, "vpc_routes": { Type: schema.TypeList, - Optional: true, + Computed: true, Description: "The network routes of this vpc.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -352,14 +356,6 @@ func newVPCBody(d *schema.ResourceData) *vpc.VpcCore { } body.SetFirewallRules(frules) - //preparing vpc routes - oroutes := d.Get("vpc_routes").([]interface{}) - vpcroutes := make([]vpc.VpcRoute, len(orules)) - for index, route := range oroutes { - vpcroutes[index] = *vpc.NewVpcRoute(route.(map[string]interface{})["cidr"].(string), route.(map[string]interface{})["next_hop"].(string)) - } - body.SetVpcRoutes(vpcroutes) - return body } @@ -370,3 +366,93 @@ func getVPCAuthCtx(ctx context.Context, pco *ProviderConfOutput) context.Context tmp := context.WithValue(ctx, vpc.ContextAccessToken, pco.access_token) return context.WithValue(tmp, vpc.ContextServerIndex, pco.server_index) } + +// Compares 2 firewall rules lists +// returns true if they are the same, false otherwise +func equalsVPCFirewallRules(old, new interface{}) bool { + old_list := old.([]interface{}) + new_list := new.([]interface{}) + + if len(new_list) != len(old_list) { + return false + } + + if len(new_list) == 0 { + return true + } + + sortFirewallRules(old_list) + sortFirewallRules(new_list) + + for i, val := range old_list { + o := val.(map[string]interface{}) + n := new_list[i].(map[string]interface{}) + + old_cidr_block := o["cidr_block"].(string) + new_cidr_block := n["cidr_block"].(string) + + if old_cidr_block != new_cidr_block { + return false + } + + old_from_port := o["from_port"] + new_from_port := n["from_port"] + + if old_from_port != new_from_port { + return false + } + + old_protocol := o["protocol"] + new_protocol := n["protocol"] + + if old_protocol != new_protocol { + return false + } + + old_to_port := o["to_port"] + new_to_port := n["to_port"] + + if old_to_port != new_to_port { + return false + } + } + + return true +} + +func sortFirewallRules(list []interface{}) { + sort.SliceStable(list, func(i, j int) bool { + i_elem := list[i].(map[string]interface{}) + j_elem := list[j].(map[string]interface{}) + + i_cidr_block := i_elem["cidr_block"].(string) + j_cidr_block := j_elem["cidr_block"].(string) + + if i_cidr_block != j_cidr_block { + return i_cidr_block < j_cidr_block + } + + i_from_port := i_elem["from_port"].(int) + j_from_port := j_elem["from_port"].(int) + + if i_from_port != j_from_port { + return i_from_port < j_from_port + } + + i_protocol := i_elem["protocol"].(string) + j_protocol := j_elem["protocol"].(string) + + if i_protocol != j_protocol { + return i_protocol < j_protocol + } + + i_to_port := i_elem["to_port"].(int) + j_to_port := j_elem["to_port"].(int) + + if i_to_port != j_to_port { + return i_to_port < j_to_port + } + + return true + }) +} diff --git a/anypoint/util.go b/anypoint/util.go index 2f5a52a..68c3cf2 100644 --- a/anypoint/util.go +++ b/anypoint/util.go @@ -65,7 +65,7 @@ func CalcSha1Digest(source string) string { return hex.EncodeToString(hasher.Sum(nil)) } -//sorts list of strings alphabetically +// sorts list of strings alphabetically func SortStrListAl(list []interface{}) { sort.SliceStable(list, func(i, j int) bool { i_elem := list[i].(string) @@ -74,20 +74,36 @@ func SortStrListAl(list []interface{}) { }) } -//sorts list of maps alphabetically using the given sort attribute -func sortMapListAl(list []interface{}, sortAttr string) { +// sorts list of maps alphabetically using the given sort attributes (by order) +func SortMapListAl(list []interface{}, sortAttrs []string) { sort.SliceStable(list, func(i, j int) bool { i_elem := list[i].(map[string]interface{}) j_elem := list[j].(map[string]interface{}) - //sortAttr := "private_key_label" - - return i_elem[sortAttr].(string) < j_elem[sortAttr].(string) + for _, k := range sortAttrs { + if i_elem[k] != nil && j_elem[k] != nil && i_elem[k].(string) != j_elem[k].(string) { + return i_elem[k].(string) < j_elem[k].(string) + } + } + return true }) } -//compares diffing for optional values, if the new value is equal to the initial value (that is the default value) -//returns true if the attribute has the same value as the initial or if the new and old value are the same which needs no updaten false otherwise. +// func filters list of map depending on the given filter function +// returns list of elements satisfying the filter +func FilterMapList(list []interface{}, filter func(map[string]interface{}) bool) []interface{} { + result := make([]interface{}, 0) + for _, item := range list { + m := item.(map[string]interface{}) + if filter(m) { + result = append(result, m) + } + } + return result +} + +// compares diffing for optional values, if the new value is equal to the initial value (that is the default value) +// returns true if the attribute has the same value as the initial or if the new and old value are the same which needs no updaten false otherwise. func DiffSuppressFunc4OptionalPrimitives(k, old, new string, d *schema.ResourceData, initial string) bool { if new == initial { return true @@ -95,3 +111,23 @@ func DiffSuppressFunc4OptionalPrimitives(k, old, new string, d *schema.ResourceD return old == new } } + +// Compares string lists +// returns true if they are the same, false otherwise +func equalStrList(old, new interface{}) bool { + old_list := old.([]interface{}) + new_list := new.([]interface{}) + + if len(new_list) != len(old_list) { + return false + } + + SortStrListAl(old_list) + SortStrListAl(new_list) + for i, item := range old_list { + if new_list[i].(string) != item.(string) { + return false + } + } + return true +} diff --git a/docs/data-sources/bg.md b/docs/data-sources/bg.md index 74fbbb1..26de106 100644 --- a/docs/data-sources/bg.md +++ b/docs/data-sources/bg.md @@ -23,121 +23,121 @@ data "anypoint_bg" "bg" { ### Required -- **id** (String) This organization's generated unique id. +- `id` (String) This organization's generated unique id. ### Read-Only -- **client_id** (String) The organization client id. -- **created_at** (String) The time when this organization was created. -- **domain** (String) The organization's domain -- **entitlements_anggovernance_level** (Number) -- **entitlements_anypointsecurityedgepolicies_enabled** (Boolean) Whether Anypoint security edge policies is enabled for this organization. -- **entitlements_anypointsecuritytokenization_enabled** (Boolean) whether Anypoint securirty tokenization is enabled for this organization. -- **entitlements_apicommunitymanager_enabled** (Boolean) Whether api community manager is enabled for this organization. -- **entitlements_apimonitoring_schedules** (Number) The number of api monitoring schedules for this organization. -- **entitlements_apiquery_enabled** (Boolean) Whether api queries are enabled for this organization. -- **entitlements_apiquery_productsku** (Number) The number of api query product sku for this organization. -- **entitlements_apiqueryc360_enabled** (Boolean) Whether api query C360 is enabled for this organization. -- **entitlements_apis_enabled** (Boolean) whether APIs are enabled for this organization. -- **entitlements_appviz** (Boolean) Whether the app vizualize if enabled for this organization. -- **entitlements_armalerts** (Boolean) Whether arm alerts are enabled for this organization. -- **entitlements_autoscaling** (Boolean) Whether autoscaling is enabled for this organization -- **entitlements_cam_enabled** (Boolean) Whether cam is enabled for this organization. -- **entitlements_createenvironments** (Boolean) Whether this organization can have additional environments. -- **entitlements_createsuborgs** (Boolean) Whether this organization can create sub organizations (descendants). -- **entitlements_crowd_environments** (Boolean) -- **entitlements_crowd_hideapimanagerdesigner** (Boolean) -- **entitlements_crowd_hideformerapiplatform** (Boolean) -- **entitlements_crowdselfservicemigration_enabled** (Boolean) Whether crow self service migration is enabled for this organization. -- **entitlements_designcenter_api** (Boolean) Whether te design center api is enabled for this organization. -- **entitlements_designcenter_mozart** (Boolean) Whether the design center mozart is enabled for this organization. -- **entitlements_exchange2_enabled** (Boolean) Whether exchange v2 is enabled for this organization. -- **entitlements_externalidentity** (Boolean) Whether an external identity provider (IDP) was assigned to this organization. -- **entitlements_gateways_assigned** (Number) The number of gateways assigned to this organization. -- **entitlements_globaldeployment** (Boolean) Whether this organization can have global deployments. -- **entitlements_hybridautodiscoverproperties** (Boolean) Whether this organization has hybrid auto-discovery properties enabled -- **entitlements_hybridenabled** (Boolean) Whether this organization has hybrid enabled. -- **entitlements_hybridinsight** (Boolean) Whether this organization has hybrid insight. -- **entitlements_kpidashboard_enabled** (Boolean) Whether KPI dashboard is enabled for this organization. -- **entitlements_loadbalancer_assigned** (Number) The number of dedicated load balancers (DLB) assigned to this organization. -- **entitlements_loadbalancer_reassigned** (Number) The number of dedicated load balancers (DLB) reassigned to this organization. -- **entitlements_messaging_assigned** (Number) The number of messaging assigned to this organization. -- **entitlements_monitoringcenter_productsku** (Number) The number of monitoring center products sku for this organization. -- **entitlements_mqadvancedfeatures_enabled** (Boolean) Whether the Anypoint MQ advanced features are enabled for this organization. -- **entitlements_mqmessages_addon** (Number) The number of MQ messages addons assigned to this organization. -- **entitlements_mqmessages_base** (Number) The number of basic MQ messages assigned to this organization. -- **entitlements_mqrequests_addon** (Number) The number of MQ requests addon assigned to this organization. -- **entitlements_mqrequests_base** (Number) The number of MQ requests base assigned to this organization. -- **entitlements_objectstorekeys_addon** (Number) The number of object store keys addon for this organization. -- **entitlements_objectstorekeys_base** (Number) The number of object store keys base for this organization. -- **entitlements_objectstorerequestunits_addon** (Number) The number of object store requests units addon for this organization. -- **entitlements_objectstorerequestunits_base** (Number) The number of object store requests unists base for this organization. -- **entitlements_partnersproduction_assigned** (Number) The number of partners production vcores assigned to this organization. -- **entitlements_partnerssandbox_assigned** (Number) The number of partners sandbox vcores assigned to this organization. -- **entitlements_pcf** (Boolean) Whether PCF is included for this organization. -- **entitlements_runtimefabric** (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. -- **entitlements_runtimefabriccloud_enabled** (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. -- **entitlements_servicemesh_enabled** (Boolean) Whether Service Mesh is enabled for this organization. -- **entitlements_staticips_assigned** (Number) The number of static IPs assigned to this organization. -- **entitlements_staticips_reassigned** (Number) The number of static IPs reassigned to this organization. -- **entitlements_tradingpartnersproduction_assigned** (Number) The number of traded partners production vcores assigned to this organization. -- **entitlements_tradingpartnerssandbox_assigned** (Number) The number of traded partners sandbox vcores assigned to this organization. -- **entitlements_vcoresdesign_assigned** (Number) The number of design vcores assigned to this organization. -- **entitlements_vcoresdesign_reassigned** (Number) The number of design vcores reassigned to this organization. -- **entitlements_vcoresproduction_assigned** (Number) The number of production vcores assigned to this organization. -- **entitlements_vcoresproduction_reassigned** (Number) The number of production vcores reassigned to this organization. -- **entitlements_vcoressandbox_assigned** (Number) The number of sandbox vcores assigned to this organization. -- **entitlements_vcoressandbox_reassigned** (Number) The number of sandbox vcores reassigned to this organization. -- **entitlements_vpcs_assigned** (Number) The number of VPCs assigned to this organization. -- **entitlements_vpcs_reassigned** (Number) The number of VPCs reassigned to this organization. -- **entitlements_vpns_assigned** (Number) The number of VPNs assigned to this organization. -- **entitlements_vpns_reassigned** (Number) The number of VPNs reassigned to this organization. -- **entitlements_workerclouds_assigned** (Number) The number of worker clouds assigned to this organization -- **entitlements_workerclouds_reassigned** (Number) The number of worker clouds reassigned to this organization -- **entitlements_workerloggingoverride_enabled** (Boolean) Whether the loggin override on workers is enabled for this organization. -- **environments** (List of Object) The organization's list of environments (see [below for nested schema](#nestedatt--environments)) -- **idprovider_id** (String) The identity provider if of this organization -- **is_automatic_admin_promotion_exempt** (Boolean) Whether the admin promotion exemption is enabled on this organization -- **is_federated** (Boolean) Whether this organization is federated. -- **is_master** (Boolean) Whether this organization is the master org. -- **mfa_required** (String) Whether MFA is enforced in this organization -- **name** (String) The name of this organization. -- **owner_created_at** (String) the organization owner creation date -- **owner_deleted** (Boolean) Whether the organization owner account is deleted. -- **owner_email** (String, Sensitive) The organization owner's email. -- **owner_enabled** (Boolean) Whether the organization owner account is enabled. -- **owner_firstname** (String, Sensitive) The organization owner's firstname -- **owner_id** (String) The user id of the owner of this organization. -- **owner_idprovider_id** (String) The organization owner identity provider id. -- **owner_lastlogin** (String) The last time the organization owner logged in. -- **owner_lastname** (String, Sensitive) The organization owner's lastname. -- **owner_mfaverification_excluded** (Boolean) Whether the organization owner MFA verification is excluded. -- **owner_mfaverifiers_configured** (String) The organization owner MFA verification configuration -- **owner_organization_id** (String) The organization owner's organization id. -- **owner_phonenumber** (String, Sensitive) The organization owner's phone number. -- **owner_type** (String) The organization owner account type. -- **owner_updated_at** (String) The organization owner update date. -- **owner_username** (String) The organization owner username. -- **parent_organization_ids** (List of String) The immediate parent organization id of this organization. -- **properties** (String) The organiztion's general properties. -- **session_timeout** (Number) The organization's session timeout -- **sub_organization_ids** (List of String) Array of descendant organizations. -- **subscription_category** (String) The anypoint platform subscription category -- **subscription_expiration** (String) The anypoint platform subscription expiration date. -- **subscription_type** (String) The anypoint platform subscription type. -- **tenant_organization_ids** (List of String) Array of tenant organizations -- **updated_at** (String) The time when this organization was updated. +- `client_id` (String) The organization client id. +- `created_at` (String) The time when this organization was created. +- `domain` (String) The organization's domain +- `entitlements_anggovernance_level` (Number) +- `entitlements_anypointsecurityedgepolicies_enabled` (Boolean) Whether Anypoint security edge policies is enabled for this organization. +- `entitlements_anypointsecuritytokenization_enabled` (Boolean) whether Anypoint securirty tokenization is enabled for this organization. +- `entitlements_apicommunitymanager_enabled` (Boolean) Whether api community manager is enabled for this organization. +- `entitlements_apimonitoring_schedules` (Number) The number of api monitoring schedules for this organization. +- `entitlements_apiquery_enabled` (Boolean) Whether api queries are enabled for this organization. +- `entitlements_apiquery_productsku` (Number) The number of api query product sku for this organization. +- `entitlements_apiqueryc360_enabled` (Boolean) Whether api query C360 is enabled for this organization. +- `entitlements_apis_enabled` (Boolean) whether APIs are enabled for this organization. +- `entitlements_appviz` (Boolean) Whether the app vizualize if enabled for this organization. +- `entitlements_armalerts` (Boolean) Whether arm alerts are enabled for this organization. +- `entitlements_autoscaling` (Boolean) Whether autoscaling is enabled for this organization +- `entitlements_cam_enabled` (Boolean) Whether cam is enabled for this organization. +- `entitlements_createenvironments` (Boolean) Whether this organization can have additional environments. +- `entitlements_createsuborgs` (Boolean) Whether this organization can create sub organizations (descendants). +- `entitlements_crowd_environments` (Boolean) +- `entitlements_crowd_hideapimanagerdesigner` (Boolean) +- `entitlements_crowd_hideformerapiplatform` (Boolean) +- `entitlements_crowdselfservicemigration_enabled` (Boolean) Whether crow self service migration is enabled for this organization. +- `entitlements_designcenter_api` (Boolean) Whether te design center api is enabled for this organization. +- `entitlements_designcenter_mozart` (Boolean) Whether the design center mozart is enabled for this organization. +- `entitlements_exchange2_enabled` (Boolean) Whether exchange v2 is enabled for this organization. +- `entitlements_externalidentity` (Boolean) Whether an external identity provider (IDP) was assigned to this organization. +- `entitlements_gateways_assigned` (Number) The number of gateways assigned to this organization. +- `entitlements_globaldeployment` (Boolean) Whether this organization can have global deployments. +- `entitlements_hybridautodiscoverproperties` (Boolean) Whether this organization has hybrid auto-discovery properties enabled +- `entitlements_hybridenabled` (Boolean) Whether this organization has hybrid enabled. +- `entitlements_hybridinsight` (Boolean) Whether this organization has hybrid insight. +- `entitlements_kpidashboard_enabled` (Boolean) Whether KPI dashboard is enabled for this organization. +- `entitlements_loadbalancer_assigned` (Number) The number of dedicated load balancers (DLB) assigned to this organization. +- `entitlements_loadbalancer_reassigned` (Number) The number of dedicated load balancers (DLB) reassigned to this organization. +- `entitlements_messaging_assigned` (Number) The number of messaging assigned to this organization. +- `entitlements_monitoringcenter_productsku` (Number) The number of monitoring center products sku for this organization. +- `entitlements_mqadvancedfeatures_enabled` (Boolean) Whether the Anypoint MQ advanced features are enabled for this organization. +- `entitlements_mqmessages_addon` (Number) The number of MQ messages addons assigned to this organization. +- `entitlements_mqmessages_base` (Number) The number of basic MQ messages assigned to this organization. +- `entitlements_mqrequests_addon` (Number) The number of MQ requests addon assigned to this organization. +- `entitlements_mqrequests_base` (Number) The number of MQ requests base assigned to this organization. +- `entitlements_objectstorekeys_addon` (Number) The number of object store keys addon for this organization. +- `entitlements_objectstorekeys_base` (Number) The number of object store keys base for this organization. +- `entitlements_objectstorerequestunits_addon` (Number) The number of object store requests units addon for this organization. +- `entitlements_objectstorerequestunits_base` (Number) The number of object store requests unists base for this organization. +- `entitlements_partnersproduction_assigned` (Number) The number of partners production vcores assigned to this organization. +- `entitlements_partnerssandbox_assigned` (Number) The number of partners sandbox vcores assigned to this organization. +- `entitlements_pcf` (Boolean) Whether PCF is included for this organization. +- `entitlements_runtimefabric` (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. +- `entitlements_runtimefabriccloud_enabled` (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. +- `entitlements_servicemesh_enabled` (Boolean) Whether Service Mesh is enabled for this organization. +- `entitlements_staticips_assigned` (Number) The number of static IPs assigned to this organization. +- `entitlements_staticips_reassigned` (Number) The number of static IPs reassigned to this organization. +- `entitlements_tradingpartnersproduction_assigned` (Number) The number of traded partners production vcores assigned to this organization. +- `entitlements_tradingpartnerssandbox_assigned` (Number) The number of traded partners sandbox vcores assigned to this organization. +- `entitlements_vcoresdesign_assigned` (Number) The number of design vcores assigned to this organization. +- `entitlements_vcoresdesign_reassigned` (Number) The number of design vcores reassigned to this organization. +- `entitlements_vcoresproduction_assigned` (Number) The number of production vcores assigned to this organization. +- `entitlements_vcoresproduction_reassigned` (Number) The number of production vcores reassigned to this organization. +- `entitlements_vcoressandbox_assigned` (Number) The number of sandbox vcores assigned to this organization. +- `entitlements_vcoressandbox_reassigned` (Number) The number of sandbox vcores reassigned to this organization. +- `entitlements_vpcs_assigned` (Number) The number of VPCs assigned to this organization. +- `entitlements_vpcs_reassigned` (Number) The number of VPCs reassigned to this organization. +- `entitlements_vpns_assigned` (Number) The number of VPNs assigned to this organization. +- `entitlements_vpns_reassigned` (Number) The number of VPNs reassigned to this organization. +- `entitlements_workerclouds_assigned` (Number) The number of worker clouds assigned to this organization +- `entitlements_workerclouds_reassigned` (Number) The number of worker clouds reassigned to this organization +- `entitlements_workerloggingoverride_enabled` (Boolean) Whether the loggin override on workers is enabled for this organization. +- `environments` (List of Object) The organization's list of environments (see [below for nested schema](#nestedatt--environments)) +- `idprovider_id` (String) The identity provider if of this organization +- `is_automatic_admin_promotion_exempt` (Boolean) Whether the admin promotion exemption is enabled on this organization +- `is_federated` (Boolean) Whether this organization is federated. +- `is_master` (Boolean) Whether this organization is the master org. +- `mfa_required` (String) Whether MFA is enforced in this organization +- `name` (String) The name of this organization. +- `owner_created_at` (String) the organization owner creation date +- `owner_deleted` (Boolean) Whether the organization owner account is deleted. +- `owner_email` (String, Sensitive) The organization owner's email. +- `owner_enabled` (Boolean) Whether the organization owner account is enabled. +- `owner_firstname` (String, Sensitive) The organization owner's firstname +- `owner_id` (String) The user id of the owner of this organization. +- `owner_idprovider_id` (String) The organization owner identity provider id. +- `owner_lastlogin` (String) The last time the organization owner logged in. +- `owner_lastname` (String, Sensitive) The organization owner's lastname. +- `owner_mfaverification_excluded` (Boolean) Whether the organization owner MFA verification is excluded. +- `owner_mfaverifiers_configured` (String) The organization owner MFA verification configuration +- `owner_organization_id` (String) The organization owner's organization id. +- `owner_phonenumber` (String, Sensitive) The organization owner's phone number. +- `owner_type` (String) The organization owner account type. +- `owner_updated_at` (String) The organization owner update date. +- `owner_username` (String) The organization owner username. +- `parent_organization_ids` (List of String) The immediate parent organization id of this organization. +- `properties` (String) The organiztion's general properties. +- `session_timeout` (Number) The organization's session timeout +- `sub_organization_ids` (List of String) Array of descendant organizations. +- `subscription_category` (String) The anypoint platform subscription category +- `subscription_expiration` (String) The anypoint platform subscription expiration date. +- `subscription_type` (String) The anypoint platform subscription type. +- `tenant_organization_ids` (List of String) Array of tenant organizations +- `updated_at` (String) The time when this organization was updated. ### Nested Schema for `environments` Read-Only: -- **client_id** (String) -- **id** (String) -- **is_production** (Boolean) -- **name** (String) -- **organization_id** (String) -- **type** (String) +- `client_id` (String) +- `id` (String) +- `is_production` (Boolean) +- `name` (String) +- `organization_id` (String) +- `type` (String) diff --git a/docs/data-sources/dlb.md b/docs/data-sources/dlb.md index 6f1a0f1..26f10a6 100644 --- a/docs/data-sources/dlb.md +++ b/docs/data-sources/dlb.md @@ -25,43 +25,43 @@ data "anypoint_dlb" "dlb" { ### Required -- **id** (String) The unique id of this dlb generated by the anypoint platform. -- **org_id** (String) The organization id where the dlb is defined. -- **vpc_id** (String) The vpc id +- `id` (String) The unique id of this dlb generated by the anypoint platform. +- `org_id` (String) The organization id where the dlb is defined. +- `vpc_id` (String) The vpc id ### Read-Only -- **default_cipher_suite** (String) The default cipher suite used by this dlb. -- **default_ssl_endpoint** (Number) The default certificate that will be served for requests not using SNI, or requesting a non-existing certificate -- **deployment_id** (String) -- **domain** (String) The domain name if this dlb. -- **double_static_ips** (Boolean) True if DLB will use double static IPs when restarting -- **enable_streaming** (Boolean) Setting this to true will disable request buffering at the DLB, thereby enabling streaming -- **forward_client_certificate** (Boolean) Setting this to true will forward any incoming client certificates to upstream application -- **http_mode** (String) Specifies whether the Load Balancer listens for HTTP requests on port 80. If set to redirect, all HTTP requests will be redirected to HTTPS. possible values: 'on', 'off' or 'redirect' -- **instance_config** (Map of String) -- **ip_addresses** (List of String) List of static IP addresses of this dlb -- **ip_addresses_info** (List of Object) List of IP addresses information of this dlb. (see [below for nested schema](#nestedatt--ip_addresses_info)) -- **ip_allowlist** (List of String) CIDR blocks to allow connections from -- **ip_whitelist** (List of String) CIDR blocks to allow connections from -- **keep_url_encoding** (Boolean) Whether to keep url encoding for this dlb. -- **name** (String) The name of the dlb. -- **proxy_read_timeout** (Number) The proxy read timeout -- **ssl_endpoints** (Set of Object) (see [below for nested schema](#nestedatt--ssl_endpoints)) -- **state** (String) The desired state, possible values: 'started', 'stopped' or 'restarted' -- **static_ips_disabled** (Boolean) Whether to disable static ips for this dlb. -- **tlsv1** (Boolean) Whether to activate TLS v1 for this dlb. -- **upstream_tlsv12** (Boolean) Whether to activate TLS v1.2 for this dlb upstream. -- **workers** (Number) The number of workers for this dlb. +- `default_cipher_suite` (String) The default cipher suite used by this dlb. +- `default_ssl_endpoint` (Number) The default certificate that will be served for requests not using SNI, or requesting a non-existing certificate +- `deployment_id` (String) +- `domain` (String) The domain name if this dlb. +- `double_static_ips` (Boolean) True if DLB will use double static IPs when restarting +- `enable_streaming` (Boolean) Setting this to true will disable request buffering at the DLB, thereby enabling streaming +- `forward_client_certificate` (Boolean) Setting this to true will forward any incoming client certificates to upstream application +- `http_mode` (String) Specifies whether the Load Balancer listens for HTTP requests on port 80. If set to redirect, all HTTP requests will be redirected to HTTPS. possible values: 'on', 'off' or 'redirect' +- `instance_config` (Map of String) +- `ip_addresses` (List of String) List of static IP addresses of this dlb +- `ip_addresses_info` (List of Object) List of IP addresses information of this dlb. (see [below for nested schema](#nestedatt--ip_addresses_info)) +- `ip_allowlist` (List of String) CIDR blocks to allow connections from +- `ip_whitelist` (List of String) CIDR blocks to allow connections from +- `keep_url_encoding` (Boolean) Whether to keep url encoding for this dlb. +- `name` (String) The name of the dlb. +- `proxy_read_timeout` (Number) The proxy read timeout +- `ssl_endpoints` (Set of Object) (see [below for nested schema](#nestedatt--ssl_endpoints)) +- `state` (String) The desired state, possible values: 'started', 'stopped' or 'restarted' +- `static_ips_disabled` (Boolean) Whether to disable static ips for this dlb. +- `tlsv1` (Boolean) Whether to activate TLS v1 for this dlb. +- `upstream_tlsv12` (Boolean) Whether to activate TLS v1.2 for this dlb upstream. +- `workers` (Number) The number of workers for this dlb. ### Nested Schema for `ip_addresses_info` Read-Only: -- **ip** (String) -- **static_ip** (Boolean) -- **status** (String) +- `ip` (String) +- `static_ip` (Boolean) +- `status` (String) @@ -69,22 +69,22 @@ Read-Only: Read-Only: -- **mappings** (List of Object) (see [below for nested schema](#nestedobjatt--ssl_endpoints--mappings)) -- **private_key_digest** (String) -- **private_key_label** (String) -- **public_key_cn** (String) -- **public_key_digest** (String) -- **public_key_label** (String) -- **verify_client_mode** (String) +- `mappings` (List of Object) (see [below for nested schema](#nestedobjatt--ssl_endpoints--mappings)) +- `private_key_digest` (String) +- `private_key_label` (String) +- `public_key_cn` (String) +- `public_key_digest` (String) +- `public_key_label` (String) +- `verify_client_mode` (String) ### Nested Schema for `ssl_endpoints.mappings` Read-Only: -- **app_name** (String) -- **app_uri** (String) -- **input_uri** (String) -- **upstream_protocol** (String) +- `app_name` (String) +- `app_uri` (String) +- `input_uri` (String) +- `upstream_protocol` (String) diff --git a/docs/data-sources/dlbs.md b/docs/data-sources/dlbs.md index 0e3eece..8e17da3 100644 --- a/docs/data-sources/dlbs.md +++ b/docs/data-sources/dlbs.md @@ -24,56 +24,53 @@ data "anypoint_dlbs" "dlbs" { ### Required -- **org_id** (String) The organization id where the dlbs are defined. -- **vpc_id** (String) the vpc id - -### Optional - -- **id** (String) The ID of this resource. +- `org_id` (String) The organization id where the dlbs are defined. +- `vpc_id` (String) the vpc id ### Read-Only -- **dlbs** (List of Object) List of dlbs defined in the given organization and vpc (see [below for nested schema](#nestedatt--dlbs)) -- **total** (Number) The total number of available results +- `dlbs` (List of Object) List of dlbs defined in the given organization and vpc (see [below for nested schema](#nestedatt--dlbs)) +- `id` (String) The ID of this resource. +- `total` (Number) The total number of available results ### Nested Schema for `dlbs` Read-Only: -- **default_cipher_suite** (String) -- **default_ssl_endpoint** (Number) -- **deployment_id** (String) -- **domain** (String) -- **double_static_ips** (Boolean) -- **enable_streaming** (Boolean) -- **forward_client_certificate** (Boolean) -- **http_mode** (String) -- **id** (String) -- **instance_config** (Map of String) -- **ip_addresses** (List of String) -- **ip_addresses_info** (List of Object) (see [below for nested schema](#nestedobjatt--dlbs--ip_addresses_info)) -- **ip_allowlist** (List of String) -- **ip_whitelist** (List of String) -- **keep_url_encoding** (Boolean) -- **name** (String) -- **proxy_read_timeout** (Number) -- **ssl_endpoints** (Set of Object) (see [below for nested schema](#nestedobjatt--dlbs--ssl_endpoints)) -- **state** (String) -- **static_ips_disabled** (Boolean) -- **tlsv1** (Boolean) -- **upstream_tlsv12** (Boolean) -- **vpc_id** (String) -- **workers** (Number) +- `default_cipher_suite` (String) +- `default_ssl_endpoint` (Number) +- `deployment_id` (String) +- `domain` (String) +- `double_static_ips` (Boolean) +- `enable_streaming` (Boolean) +- `forward_client_certificate` (Boolean) +- `http_mode` (String) +- `id` (String) +- `instance_config` (Map of String) +- `ip_addresses` (List of String) +- `ip_addresses_info` (List of Object) (see [below for nested schema](#nestedobjatt--dlbs--ip_addresses_info)) +- `ip_allowlist` (List of String) +- `ip_whitelist` (List of String) +- `keep_url_encoding` (Boolean) +- `name` (String) +- `proxy_read_timeout` (Number) +- `ssl_endpoints` (Set of Object) (see [below for nested schema](#nestedobjatt--dlbs--ssl_endpoints)) +- `state` (String) +- `static_ips_disabled` (Boolean) +- `tlsv1` (Boolean) +- `upstream_tlsv12` (Boolean) +- `vpc_id` (String) +- `workers` (Number) ### Nested Schema for `dlbs.ip_addresses_info` Read-Only: -- **ip** (String) -- **static_ip** (Boolean) -- **status** (String) +- `ip` (String) +- `static_ip` (Boolean) +- `status` (String) @@ -81,22 +78,22 @@ Read-Only: Read-Only: -- **mappings** (List of Object) (see [below for nested schema](#nestedobjatt--dlbs--ssl_endpoints--mappings)) -- **private_key_digest** (String) -- **private_key_label** (String) -- **public_key_cn** (String) -- **public_key_digest** (String) -- **public_key_label** (String) -- **verify_client_mode** (String) +- `mappings` (List of Object) (see [below for nested schema](#nestedobjatt--dlbs--ssl_endpoints--mappings)) +- `private_key_digest` (String) +- `private_key_label` (String) +- `public_key_cn` (String) +- `public_key_digest` (String) +- `public_key_label` (String) +- `verify_client_mode` (String) ### Nested Schema for `dlbs.ssl_endpoints.mappings` Read-Only: -- **app_name** (String) -- **app_uri** (String) -- **input_uri** (String) -- **upstream_protocol** (String) +- `app_name` (String) +- `app_uri` (String) +- `input_uri` (String) +- `upstream_protocol` (String) diff --git a/docs/data-sources/env.md b/docs/data-sources/env.md index 123d774..f4ef209 100644 --- a/docs/data-sources/env.md +++ b/docs/data-sources/env.md @@ -24,15 +24,15 @@ data "anypoint_env" "env" { ### Required -- **id** (String) The unique id of this environment generated by the anypoint platform. -- **org_id** (String) The organization id where the environment is defined. +- `id` (String) The unique id of this environment generated by the anypoint platform. +- `org_id` (String) The organization id where the environment is defined. ### Read-Only -- **client_id** (String) -- **is_production** (Boolean) True if the environment is a production environment -- **name** (String) The name of the environment -- **organization_id** (String) The organization id where the environment is defined. -- **type** (String) The type of the environment: sandbox or production +- `client_id` (String) +- `is_production` (Boolean) True if the environment is a production environment +- `name` (String) The name of the environment +- `organization_id` (String) The organization id where the environment is defined. +- `type` (String) The type of the environment: sandbox or production diff --git a/docs/data-sources/idp.md b/docs/data-sources/idp.md index b369715..715706c 100644 --- a/docs/data-sources/idp.md +++ b/docs/data-sources/idp.md @@ -24,34 +24,34 @@ data "anypoint_idp" "idp" { ### Required -- **id** (String) The unique id of this identity provider generated by the anypoint platform. -- **org_id** (String) The master organization id where the idp is defined. +- `id` (String) The unique id of this identity provider generated by the anypoint platform. +- `org_id` (String) The master organization id where the idp is defined. ### Read-Only -- **name** (String) The name of the identity provider -- **oidc_provider** (Set of Object) The description of provider specific for OIDC types (see [below for nested schema](#nestedatt--oidc_provider)) -- **provider_id** (String) The identity provider unique generated id -- **saml** (Set of Object) The description of provider specific for SAML types (see [below for nested schema](#nestedatt--saml)) -- **sp_sign_on_url** (String) The provider's sign on url -- **sp_sign_out_url** (String) The provider's sign out url, only available for SAML -- **type** (Map of String) The type of the provider, contains description and the name of the type of the provider (saml or oidc) +- `name` (String) The name of the identity provider +- `oidc_provider` (Set of Object) The description of provider specific for OIDC types (see [below for nested schema](#nestedatt--oidc_provider)) +- `provider_id` (String) The identity provider unique generated id +- `saml` (Set of Object) The description of provider specific for SAML types (see [below for nested schema](#nestedatt--saml)) +- `sp_sign_on_url` (String) The provider's sign on url +- `sp_sign_out_url` (String) The provider's sign out url, only available for SAML +- `type` (Map of String) The type of the provider, contains description and the name of the type of the provider (saml or oidc) ### Nested Schema for `oidc_provider` Read-Only: -- **allow_untrusted_certificates** (Boolean) -- **authorize_url** (String) -- **client_credentials_id** (String) -- **client_registration_url** (String) -- **client_token_endpoint_auth_methods_supported** (List of String) -- **group_scope** (String) -- **issuer** (String) -- **redirect_url** (String) -- **token_url** (String) -- **userinfo_url** (String) +- `allow_untrusted_certificates` (Boolean) +- `authorize_url` (String) +- `client_credentials_id` (String) +- `client_registration_url` (String) +- `client_token_endpoint_auth_methods_supported` (List of String) +- `group_scope` (String) +- `issuer` (String) +- `redirect_url` (String) +- `token_url` (String) +- `userinfo_url` (String) @@ -59,16 +59,16 @@ Read-Only: Read-Only: -- **audience** (String) -- **claims_mapping_email_attribute** (String) -- **claims_mapping_firstname_attribute** (String) -- **claims_mapping_group_attribute** (String) -- **claims_mapping_lastname_attribute** (String) -- **claims_mapping_username_attribute** (String) -- **idp_initiated_sso_enabled** (Boolean) -- **issuer** (String) -- **public_key** (List of String) -- **require_encrypted_saml_assertions** (Boolean) -- **sp_initiated_sso_enabled** (Boolean) +- `audience` (String) +- `claims_mapping_email_attribute` (String) +- `claims_mapping_firstname_attribute` (String) +- `claims_mapping_group_attribute` (String) +- `claims_mapping_lastname_attribute` (String) +- `claims_mapping_username_attribute` (String) +- `idp_initiated_sso_enabled` (Boolean) +- `issuer` (String) +- `public_key` (List of String) +- `require_encrypted_saml_assertions` (Boolean) +- `sp_initiated_sso_enabled` (Boolean) diff --git a/docs/data-sources/idps.md b/docs/data-sources/idps.md index acdc4f5..a65c9d8 100644 --- a/docs/data-sources/idps.md +++ b/docs/data-sources/idps.md @@ -23,25 +23,22 @@ data "anypoint_idps" "idp" { ### Required -- **org_id** (String) The master organization id where the idps are defined. - -### Optional - -- **id** (String) The ID of this resource. +- `org_id` (String) The master organization id where the idps are defined. ### Read-Only -- **idps** (List of Object) List of providers for the given org (see [below for nested schema](#nestedatt--idps)) -- **total** (Number) The total number of available results +- `id` (String) The ID of this resource. +- `idps` (List of Object) List of providers for the given org (see [below for nested schema](#nestedatt--idps)) +- `total` (Number) The total number of available results ### Nested Schema for `idps` Read-Only: -- **name** (String) -- **org_id** (String) -- **provider_id** (String) -- **type** (Map of String) +- `name` (String) +- `org_id` (String) +- `provider_id` (String) +- `type` (Map of String) diff --git a/docs/data-sources/rolegroup.md b/docs/data-sources/rolegroup.md index c6762a7..f60915c 100644 --- a/docs/data-sources/rolegroup.md +++ b/docs/data-sources/rolegroup.md @@ -27,16 +27,16 @@ output "rg" { ### Required -- **id** (String) The unique id of this role-group generated by the anypoint platform. -- **org_id** (String) The master orgnization id where the role-group is defined +- `id` (String) The unique id of this role-group generated by the anypoint platform. +- `org_id` (String) The master orgnization id where the role-group is defined ### Read-Only -- **created_at** (String) The role-group creation date -- **description** (String) The description of the role-group -- **editable** (Boolean) Whether the role-group is editable -- **external_names** (List of String) List of external names of the role-group -- **name** (String) hte name of the role-group -- **updated_at** (String) The role-group update date +- `created_at` (String) The role-group creation date +- `description` (String) The description of the role-group +- `editable` (Boolean) Whether the role-group is editable +- `external_names` (List of String) List of external names of the role-group +- `name` (String) hte name of the role-group +- `updated_at` (String) The role-group update date diff --git a/docs/data-sources/rolegroups.md b/docs/data-sources/rolegroups.md index ce77d2a..fe35ebf 100644 --- a/docs/data-sources/rolegroups.md +++ b/docs/data-sources/rolegroups.md @@ -27,30 +27,27 @@ output "rgs" { ### Required -- **org_id** (String) The unique id of this role-group generated by the anypoint platform. - -### Optional - -- **id** (String) The ID of this resource. +- `org_id` (String) The unique id of this role-group generated by the anypoint platform. ### Read-Only -- **role_groups** (List of Object) List of role-groups defined in the given organization (see [below for nested schema](#nestedatt--role_groups)) -- **total** (Number) Total number of results +- `id` (String) The ID of this resource. +- `role_groups` (List of Object) List of role-groups defined in the given organization (see [below for nested schema](#nestedatt--role_groups)) +- `total` (Number) Total number of results ### Nested Schema for `role_groups` Read-Only: -- **created_at** (String) -- **description** (String) -- **editable** (Boolean) -- **external_names** (List of String) -- **name** (String) -- **org_id** (String) -- **role_group_id** (String) -- **updated_at** (String) -- **user_count** (Number) +- `created_at` (String) +- `description` (String) +- `editable` (Boolean) +- `external_names` (List of String) +- `name` (String) +- `org_id` (String) +- `role_group_id` (String) +- `updated_at` (String) +- `user_count` (Number) diff --git a/docs/data-sources/roles.md b/docs/data-sources/roles.md index aa8c4d3..15efb47 100644 --- a/docs/data-sources/roles.md +++ b/docs/data-sources/roles.md @@ -35,27 +35,27 @@ output "roles" { ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **len** (Number) The number of loaded results (pagination purpose). -- **roles** (List of Object) (see [below for nested schema](#nestedatt--roles)) -- **total** (Number) The total number of available results +- `id` (String) The ID of this resource. +- `len` (Number) The number of loaded results (pagination purpose). +- `roles` (List of Object) (see [below for nested schema](#nestedatt--roles)) +- `total` (Number) The total number of available results ### Nested Schema for `params` Optional: -- **ascending** (Boolean) Sort order for filtering -- **description** (String) The description of a role -- **include_internal** (Boolean) Include internal roles -- **limit** (Number) Pagination parameter for how many results to return -- **name** (String) The name of a role -- **offset** (Number) Pagination parameter to start returning results from this position of matches -- **search** (String) A search string to use for partial matches of role names +- `ascending` (Boolean) Sort order for filtering +- `description` (String) The description of a role +- `include_internal` (Boolean) Include internal roles +- `limit` (Number) Pagination parameter for how many results to return +- `name` (String) The name of a role +- `offset` (Number) Pagination parameter to start returning results from this position of matches +- `search` (String) A search string to use for partial matches of role names @@ -63,12 +63,12 @@ Optional: Read-Only: -- **description** (String) -- **internal** (Boolean) -- **name** (String) -- **namespaces** (List of String) -- **org_id** (String) -- **role_id** (String) -- **shareable** (Boolean) +- `description` (String) +- `internal` (Boolean) +- `name` (String) +- `namespaces` (List of String) +- `org_id` (String) +- `role_id` (String) +- `shareable` (Boolean) diff --git a/docs/data-sources/team.md b/docs/data-sources/team.md index e020fd3..0860f71 100644 --- a/docs/data-sources/team.md +++ b/docs/data-sources/team.md @@ -24,23 +24,23 @@ resource "anypoint_team" "team" { ### Required -- **id** (String) The unique id of this team generated by the anypoint platform. -- **org_id** (String) The master organization id where the team is defined. +- `id` (String) The unique id of this team generated by the anypoint platform. +- `org_id` (String) The master organization id where the team is defined. ### Optional -- **ancestor_team_ids** (List of String) Array of ancestor teams ids starting from either the internal or external root team down to this team's parent. +- `ancestor_team_ids` (List of String) Array of ancestor teams ids starting from either the internal or external root team down to this team's parent. ### Read-Only -- **created_at** (String) The time the team was created. -- **team_id** (String) The id of the team. team_id is globally unique -- **team_name** (String) The name of the team. Name is unique among teams within the organization. -- **team_type** (String) The type of the team. Internal teams are visible to all members of the organziation. +- `created_at` (String) The time the team was created. +- `team_id` (String) The id of the team. team_id is globally unique +- `team_name` (String) The name of the team. Name is unique among teams within the organization. +- `team_type` (String) The type of the team. Internal teams are visible to all members of the organziation. All internal teams of an organization are under the root internal team. Private teams are internal teams but are only visible by maintainers/members of the team. Shared teams are internal teams that can be mapped to external teams in other organizations where a trust relationship has been formed. Enum values are: internal, private and shared. -- **updated_at** (String) The time the team was last modified. +- `updated_at` (String) The time the team was last modified. diff --git a/docs/data-sources/team_group_mappings.md b/docs/data-sources/team_group_mappings.md index 5551b2c..f6cb626 100644 --- a/docs/data-sources/team_group_mappings.md +++ b/docs/data-sources/team_group_mappings.md @@ -28,26 +28,26 @@ output "team_gmap" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **team_id** (String) The id of the team. team_id is globally unique +- `org_id` (String) The master organization id where the team is defined. +- `team_id` (String) The id of the team. team_id is globally unique ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) Selection parameters. Should only provide one occurrence. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) Selection parameters. Should only provide one occurrence. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **teamgroupmappings** (List of Object) List of resulting groupmappings. (see [below for nested schema](#nestedatt--teamgroupmappings)) -- **total** (Number) The total number of available results +- `id` (String) The ID of this resource. +- `teamgroupmappings` (List of Object) List of resulting groupmappings. (see [below for nested schema](#nestedatt--teamgroupmappings)) +- `total` (Number) The total number of available results ### Nested Schema for `params` Optional: -- **limit** (Number) Maximum records to retrieve per request. -- **offset** (Number) The number of records to omit from the response +- `limit` (Number) Maximum records to retrieve per request. +- `offset` (Number) The number of records to omit from the response @@ -55,8 +55,8 @@ Optional: Read-Only: -- **external_group_name** (String) -- **membership_type** (String) -- **provider_id** (String) +- `external_group_name` (String) +- `membership_type` (String) +- `provider_id` (String) diff --git a/docs/data-sources/team_members.md b/docs/data-sources/team_members.md index fc091d6..3481486 100644 --- a/docs/data-sources/team_members.md +++ b/docs/data-sources/team_members.md @@ -35,32 +35,32 @@ resource "anypoint_team_members" "team_members" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **team_id** (String) The id of the team. team_id is globally unique. +- `org_id` (String) The master organization id where the team is defined. +- `team_id` (String) The id of the team. team_id is globally unique. ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **teammembers** (List of Object) The list of resulting team-members. (see [below for nested schema](#nestedatt--teammembers)) -- **total** (Number) The total number of available results +- `id` (String) The ID of this resource. +- `teammembers` (List of Object) The list of resulting team-members. (see [below for nested schema](#nestedatt--teammembers)) +- `total` (Number) The total number of available results ### Nested Schema for `params` Optional: -- **ascending** (Boolean) Whether to sort ascending or descending -- **identity_type** (String) A search string to use for case-insensitive partial matches on external group name -- **limit** (Number) Maximum records to retrieve per request. -- **member_ids** (List of String) Include the members of the team that have ids in this list -- **membership_type** (String) Include the group access mappings that grant the provided membership type By default, all group access mappings are returned -- **offset** (Number) The number of records to omit from the response. -- **search** (String) Maximum records to retrieve per request. -- **sort** (String) The field to sort on +- `ascending` (Boolean) Whether to sort ascending or descending +- `identity_type` (String) A search string to use for case-insensitive partial matches on external group name +- `limit` (Number) Maximum records to retrieve per request. +- `member_ids` (List of String) Include the members of the team that have ids in this list +- `membership_type` (String) Include the group access mappings that grant the provided membership type By default, all group access mappings are returned +- `offset` (Number) The number of records to omit from the response. +- `search` (String) Maximum records to retrieve per request. +- `sort` (String) The field to sort on @@ -68,12 +68,12 @@ Optional: Read-Only: -- **created_at** (String) -- **id** (String) -- **identity_type** (String) -- **is_assigned_via_external_groups** (Boolean) -- **membership_type** (String) -- **name** (String) -- **updated_at** (String) +- `created_at` (String) +- `id` (String) +- `identity_type` (String) +- `is_assigned_via_external_groups` (Boolean) +- `membership_type` (String) +- `name` (String) +- `updated_at` (String) diff --git a/docs/data-sources/team_roles.md b/docs/data-sources/team_roles.md index 6d60bd4..85cb077 100644 --- a/docs/data-sources/team_roles.md +++ b/docs/data-sources/team_roles.md @@ -35,29 +35,29 @@ output "team_roles" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **team_id** (String) The id of the team. team_id is globally unique. +- `org_id` (String) The master organization id where the team is defined. +- `team_id` (String) The id of the team. team_id is globally unique. ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **len** (Number) The number of loaded results (pagination purpose). -- **roles** (List of Object) The resulted list of roles. (see [below for nested schema](#nestedatt--roles)) -- **total** (Number) The total number of available results. +- `id` (String) The ID of this resource. +- `len` (Number) The number of loaded results (pagination purpose). +- `roles` (List of Object) The resulted list of roles. (see [below for nested schema](#nestedatt--roles)) +- `total` (Number) The total number of available results. ### Nested Schema for `params` Optional: -- **limit** (Number) Maximum records to retrieve per request. -- **offset** (Number) The number of records to omit from the response. -- **role_id** (String) return only role assignments containing one of the supplied role_ids -- **search** (String) A search string to use for case-insensitive partial matches on role name +- `limit` (Number) Maximum records to retrieve per request. +- `offset` (Number) The number of records to omit from the response. +- `role_id` (String) return only role assignments containing one of the supplied role_ids +- `search` (String) A search string to use for case-insensitive partial matches on role name @@ -65,8 +65,8 @@ Optional: Read-Only: -- **context_params** (Map of String) -- **name** (String) -- **role_id** (String) +- `context_params` (Map of String) +- `name` (String) +- `role_id` (String) diff --git a/docs/data-sources/teams.md b/docs/data-sources/teams.md index 8c3214c..8813ca1 100644 --- a/docs/data-sources/teams.md +++ b/docs/data-sources/teams.md @@ -35,33 +35,33 @@ resource "anypoint_team" "team" { ### Required -- **org_id** (String) The master organization id where the team is defined. +- `org_id` (String) The master organization id where the team is defined. ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **len** (Number) The number of loaded results (for pagination purposes). -- **teams** (List of Object) The list of resulting teams. (see [below for nested schema](#nestedatt--teams)) -- **total** (Number) The total number of available results +- `id` (String) The ID of this resource. +- `len` (Number) The number of loaded results (for pagination purposes). +- `teams` (List of Object) The list of resulting teams. (see [below for nested schema](#nestedatt--teams)) +- `total` (Number) The total number of available results ### Nested Schema for `params` Optional: -- **ancestor_team_id** (List of String) team_id that must appear in the team's ancestor_team_ids. -- **ascending** (Boolean) Whether to sort ascending or descending. -- **limit** (Number) Maximum records to retrieve per request. -- **offset** (Number) The number of records to omit from the response. -- **parent_team_id** (List of String) team_id of the immediate parent of the team to return. -- **search** (String) A search string to use for case-insensitive partial matches on team name -- **sort** (String) The field to sort on. -- **team_id** (String) id of the team to return. -- **team_type** (String) return only teams that are of this type +- `ancestor_team_id` (List of String) team_id that must appear in the team's ancestor_team_ids. +- `ascending` (Boolean) Whether to sort ascending or descending. +- `limit` (Number) Maximum records to retrieve per request. +- `offset` (Number) The number of records to omit from the response. +- `parent_team_id` (List of String) team_id of the immediate parent of the team to return. +- `search` (String) A search string to use for case-insensitive partial matches on team name +- `sort` (String) The field to sort on. +- `team_id` (String) id of the team to return. +- `team_type` (String) return only teams that are of this type @@ -69,12 +69,12 @@ Optional: Read-Only: -- **ancestor_team_ids** (List of String) -- **created_at** (String) -- **org_id** (String) -- **team_id** (String) -- **team_name** (String) -- **team_type** (String) -- **updated_at** (String) +- `ancestor_team_ids` (List of String) +- `created_at` (String) +- `org_id` (String) +- `team_id` (String) +- `team_name` (String) +- `team_type` (String) +- `updated_at` (String) diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index f22548c..b5d9212 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -28,31 +28,31 @@ data "anypoint_user" "user" { ### Required -- **id** (String) The unique id of this user generated by the anypoint platform. -- **org_id** (String) The master organization id where the user is defined. +- `id` (String) The unique id of this user generated by the anypoint platform. +- `org_id` (String) The master organization id where the user is defined. ### Read-Only -- **contributor_of_organizations** (Set of Map of String) The list of organizations this user has contributed to. -- **created_at** (String) The time when the user was created. -- **deleted** (Boolean) Whether this user is deleted -- **email** (String) The email of this user. -- **enabled** (Boolean) Whether this user is enabled -- **first_name** (String) The firstname of this user. -- **idprovider_id** (String) The identity provider id -- **is_federated** (Boolean) Whether this user is federated. -- **last_login** (String) The last time this user logged in. -- **last_name** (String) The lastname of this user. -- **member_of_organizations** (Set of Map of String) The user's list of organizations membership -- **mfa_verification_excluded** (Boolean) Whether MFA verification is excluded for this user -- **mfa_verifiers_configured** (String) The MFA configured for this user. -- **organization** (Map of String) The organization information -- **organization_id** (String) The master organization id where the user is defined. -- **organization_preferences** (Map of String) The preferences of the user within the organization. -- **phone_number** (String) The phone number of this user. -- **properties** (String) The user's properties. -- **type** (String) The type of user. -- **updated_at** (String) The last time this user was updated. -- **username** (String) The username of this user. +- `contributor_of_organizations` (Set of Map of String) The list of organizations this user has contributed to. +- `created_at` (String) The time when the user was created. +- `deleted` (Boolean) Whether this user is deleted +- `email` (String) The email of this user. +- `enabled` (Boolean) Whether this user is enabled +- `first_name` (String) The firstname of this user. +- `idprovider_id` (String) The identity provider id +- `is_federated` (Boolean) Whether this user is federated. +- `last_login` (String) The last time this user logged in. +- `last_name` (String) The lastname of this user. +- `member_of_organizations` (Set of Map of String) The user's list of organizations membership +- `mfa_verification_excluded` (Boolean) Whether MFA verification is excluded for this user +- `mfa_verifiers_configured` (String) The MFA configured for this user. +- `organization` (Map of String) The organization information +- `organization_id` (String) The master organization id where the user is defined. +- `organization_preferences` (Map of String) The preferences of the user within the organization. +- `phone_number` (String) The phone number of this user. +- `properties` (String) The user's properties. +- `type` (String) The type of user. +- `updated_at` (String) The last time this user was updated. +- `username` (String) The username of this user. diff --git a/docs/data-sources/user_rolegroup.md b/docs/data-sources/user_rolegroup.md index 342c457..27df083 100644 --- a/docs/data-sources/user_rolegroup.md +++ b/docs/data-sources/user_rolegroup.md @@ -17,24 +17,21 @@ Reads the `user` related `rolegroup` in the business group. ### Required -- **org_id** (String) The master organization id where the role-group is defined. -- **rolegroup_id** (String) The role-group id. -- **user_id** (String) The user id. - -### Optional - -- **id** (String) The ID of this resource. +- `org_id` (String) The master organization id where the role-group is defined. +- `rolegroup_id` (String) The role-group id. +- `user_id` (String) The user id. ### Read-Only -- **context_params** (Map of String) The role-group scope. -- **created_at** (String) The time when the user was assigned to the role-group. -- **description** (String) The description of the role-group -- **editable** (Boolean) Whether the role-group is editable -- **external_names** (List of String) List of external names of the role-group -- **name** (String) The name of the role-group. -- **role_group_id** (String) The role-group id. -- **updated_at** (String) The time when the user assignment to the role-group was updated. -- **user_role_group_id** (String) The unique if of the user assignment to the role-group +- `context_params` (Map of String) The role-group scope. +- `created_at` (String) The time when the user was assigned to the role-group. +- `description` (String) The description of the role-group +- `editable` (Boolean) Whether the role-group is editable +- `external_names` (List of String) List of external names of the role-group +- `id` (String) The ID of this resource. +- `name` (String) The name of the role-group. +- `role_group_id` (String) The role-group id. +- `updated_at` (String) The time when the user assignment to the role-group was updated. +- `user_role_group_id` (String) The unique if of the user assignment to the role-group diff --git a/docs/data-sources/user_rolegroups.md b/docs/data-sources/user_rolegroups.md index bb771e1..b5a0855 100644 --- a/docs/data-sources/user_rolegroups.md +++ b/docs/data-sources/user_rolegroups.md @@ -17,27 +17,27 @@ Reads all `user` related `rolegroups` in the business group. ### Required -- **org_id** (String) The master organization id where the role-group is defined. -- **user_id** (String) The user id. +- `org_id` (String) The master organization id where the role-group is defined. +- `user_id` (String) The user id. ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **len** (Number) The number of loaded results (pagination purposes). -- **rolegroups** (List of Object) The list of resulted rolegroups. (see [below for nested schema](#nestedatt--rolegroups)) -- **total** (Number) The total number of available results. +- `id` (String) The ID of this resource. +- `len` (Number) The number of loaded results (pagination purposes). +- `rolegroups` (List of Object) The list of resulted rolegroups. (see [below for nested schema](#nestedatt--rolegroups)) +- `total` (Number) The total number of available results. ### Nested Schema for `params` Optional: -- **limit** (Number) Maximum records to retrieve per request. -- **offset** (Number) The number of records to omit from the response. +- `limit` (Number) Maximum records to retrieve per request. +- `offset` (Number) The number of records to omit from the response. @@ -45,15 +45,15 @@ Optional: Read-Only: -- **context_params** (Map of String) -- **created_at** (String) -- **description** (String) -- **editable** (Boolean) -- **external_names** (List of String) -- **name** (String) -- **org_id** (String) -- **role_group_id** (String) -- **updated_at** (String) -- **user_role_group_id** (String) +- `context_params` (Map of String) +- `created_at` (String) +- `description` (String) +- `editable` (Boolean) +- `external_names` (List of String) +- `name` (String) +- `org_id` (String) +- `role_group_id` (String) +- `updated_at` (String) +- `user_role_group_id` (String) diff --git a/docs/data-sources/users.md b/docs/data-sources/users.md index da50a66..ee90af1 100644 --- a/docs/data-sources/users.md +++ b/docs/data-sources/users.md @@ -32,27 +32,27 @@ data "anypoint_users" "users" { ### Required -- **org_id** (String) The master organization id where the user is defined. +- `org_id` (String) The master organization id where the user is defined. ### Optional -- **id** (String) The ID of this resource. -- **params** (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) +- `params` (Block Set) The search parameters. Should only provide one occurrence of the block. (see [below for nested schema](#nestedblock--params)) ### Read-Only -- **len** (Number) The number of loaded results (for pagination purposes). -- **total** (Number) The total number of available results -- **users** (List of Object) The list of resulted users. (see [below for nested schema](#nestedatt--users)) +- `id` (String) The ID of this resource. +- `len` (Number) The number of loaded results (for pagination purposes). +- `total` (Number) The total number of available results +- `users` (List of Object) The list of resulted users. (see [below for nested schema](#nestedatt--users)) ### Nested Schema for `params` Optional: -- **limit** (Number) Maximum records to retrieve per request. default 25, min 0, max 500 -- **offset** (Number) The number of records to omit from the response. -- **type** (String) specify the type of the user you want to retrive [all, host, proxy] +- `limit` (Number) Maximum records to retrieve per request. default 25, min 0, max 500 +- `offset` (Number) The number of records to omit from the response. +- `type` (String) specify the type of the user you want to retrive [all, host, proxy] @@ -60,24 +60,24 @@ Optional: Read-Only: -- **contributor_of_organizations** (Set of Map of String) -- **created_at** (String) -- **email** (String) -- **enabled** (Boolean) -- **first_name** (String) -- **id** (String) -- **idprovider_id** (String) -- **is_federated** (Boolean) -- **last_login** (String) -- **last_name** (String) -- **member_of_organizations** (Set of Map of String) -- **mfa_verification_excluded** (Boolean) -- **mfa_verifiers_configured** (String) -- **organization** (Map of String) -- **organization_id** (String) -- **primary_organization** (Map of String) -- **type** (String) -- **updated_at** (String) -- **username** (String) +- `contributor_of_organizations` (Set of Map of String) +- `created_at` (String) +- `email` (String) +- `enabled` (Boolean) +- `first_name` (String) +- `id` (String) +- `idprovider_id` (String) +- `is_federated` (Boolean) +- `last_login` (String) +- `last_name` (String) +- `member_of_organizations` (Set of Map of String) +- `mfa_verification_excluded` (Boolean) +- `mfa_verifiers_configured` (String) +- `organization` (Map of String) +- `organization_id` (String) +- `primary_organization` (Map of String) +- `type` (String) +- `updated_at` (String) +- `username` (String) diff --git a/docs/data-sources/vpc.md b/docs/data-sources/vpc.md index beebe92..3e0f760 100644 --- a/docs/data-sources/vpc.md +++ b/docs/data-sources/vpc.md @@ -28,35 +28,35 @@ data "anypoint_vpc" "avpc" { ### Required -- **id** (String) The unique id of this vpc generated by the anypoint platform. -- **org_id** (String) The organization id where the vpc is defined. +- `id` (String) The unique id of this vpc generated by the anypoint platform. +- `org_id` (String) The organization id where the vpc is defined. ### Optional -- **owner_id** (String) The id of the organization that owns the VPC -- **shared_with** (List of String) A list of Business Groups to share this VPC with +- `owner_id` (String) The id of the organization that owns the VPC +- `shared_with` (List of String) A list of Business Groups to share this VPC with ### Read-Only -- **associated_environments** (List of String) A list of CloudHub environments to associate to this VPC -- **cidr_block** (String) The IP address range that the VPC will use. The largest is /16 and the smallest, /24 -- **firewall_rules** (Block List) Inbound firewall rules for all CloudHub workers in this VPC. The list is allow only with an implicit deny all if no rules match (see [below for nested schema](#nestedblock--firewall_rules)) -- **internal_dns_servers** (List of String) List of internal dns servers -- **internal_dns_special_domains** (List of String) List of internal dns special domains -- **is_default** (Boolean) If set to true, the VPC will be associated to all CloudHub environments not explicitly associated to another VPC, including newly created ones -- **name** (String) The name of the vpc. -- **region** (String) The CloudHub region where this VPC will exist -- **vpc_routes** (Block List) The network routes of this VPC. (see [below for nested schema](#nestedblock--vpc_routes)) +- `associated_environments` (List of String) A list of CloudHub environments to associate to this VPC +- `cidr_block` (String) The IP address range that the VPC will use. The largest is /16 and the smallest, /24 +- `firewall_rules` (Block List) Inbound firewall rules for all CloudHub workers in this VPC. The list is allow only with an implicit deny all if no rules match (see [below for nested schema](#nestedblock--firewall_rules)) +- `internal_dns_servers` (List of String) List of internal dns servers +- `internal_dns_special_domains` (List of String) List of internal dns special domains +- `is_default` (Boolean) If set to true, the VPC will be associated to all CloudHub environments not explicitly associated to another VPC, including newly created ones +- `name` (String) The name of the vpc. +- `region` (String) The CloudHub region where this VPC will exist +- `vpc_routes` (Block List) The network routes of this VPC. (see [below for nested schema](#nestedblock--vpc_routes)) ### Nested Schema for `firewall_rules` Read-Only: -- **cidr_block** (String) -- **from_port** (Number) -- **protocol** (String) -- **to_port** (Number) +- `cidr_block` (String) +- `from_port` (Number) +- `protocol` (String) +- `to_port` (Number) @@ -64,7 +64,7 @@ Read-Only: Read-Only: -- **cidr** (String) -- **next_hop** (String) +- `cidr` (String) +- `next_hop` (String) diff --git a/docs/data-sources/vpcs.md b/docs/data-sources/vpcs.md index 7d7e7dc..1f78f40 100644 --- a/docs/data-sources/vpcs.md +++ b/docs/data-sources/vpcs.md @@ -27,43 +27,40 @@ data "anypoint_vpcs" "all" { ### Required -- **org_id** (String) The organization id where the vpc is defined. - -### Optional - -- **id** (String) The ID of this resource. +- `org_id` (String) The organization id where the vpc is defined. ### Read-Only -- **vpcs** (List of Object) List of vpcs defined in the given organization (see [below for nested schema](#nestedatt--vpcs)) +- `id` (String) The ID of this resource. +- `vpcs` (List of Object) List of vpcs defined in the given organization (see [below for nested schema](#nestedatt--vpcs)) ### Nested Schema for `vpcs` Read-Only: -- **associated_environments** (List of String) -- **cidr_block** (String) -- **firewall_rules** (List of Object) (see [below for nested schema](#nestedobjatt--vpcs--firewall_rules)) -- **id** (String) -- **internal_dns_servers** (List of String) -- **internal_dns_special_domains** (List of String) -- **is_default** (Boolean) -- **name** (String) -- **owner_id** (String) -- **region** (String) -- **shared_with** (List of String) -- **vpc_routes** (List of Object) (see [below for nested schema](#nestedobjatt--vpcs--vpc_routes)) +- `associated_environments` (List of String) +- `cidr_block` (String) +- `firewall_rules` (List of Object) (see [below for nested schema](#nestedobjatt--vpcs--firewall_rules)) +- `id` (String) +- `internal_dns_servers` (List of String) +- `internal_dns_special_domains` (List of String) +- `is_default` (Boolean) +- `name` (String) +- `owner_id` (String) +- `region` (String) +- `shared_with` (List of String) +- `vpc_routes` (List of Object) (see [below for nested schema](#nestedobjatt--vpcs--vpc_routes)) ### Nested Schema for `vpcs.firewall_rules` Read-Only: -- **cidr_block** (String) -- **from_port** (Number) -- **protocol** (String) -- **to_port** (Number) +- `cidr_block` (String) +- `from_port` (Number) +- `protocol` (String) +- `to_port` (Number) @@ -71,7 +68,7 @@ Read-Only: Read-Only: -- **cidr** (String) -- **next_hop** (String) +- `cidr` (String) +- `next_hop` (String) diff --git a/docs/data-sources/vpn.md b/docs/data-sources/vpn.md index 585abf9..1f5bfff 100644 --- a/docs/data-sources/vpn.md +++ b/docs/data-sources/vpn.md @@ -29,33 +29,33 @@ data "anypoint_vpn" "avpn" { ### Required -- **id** (String) The unique id of this vpn generated by the anypoint platform. -- **org_id** (String) The organization id where the vpn is defined. -- **vpc_id** (String) The vpc id where the vpn is defined. +- `id` (String) The unique id of this vpn generated by the anypoint platform. +- `org_id` (String) The organization id where the vpn is defined. +- `vpc_id` (String) The vpc id where the vpn is defined. ### Read-Only -- **created_at** (String) The vpn creation time -- **failed_reason** (String) The error message if the vpn fails -- **local_asn** (Number) The local Autonomous System Number -- **name** (String) The name of the vpn. -- **remote_asn** (Number) The unique remote Autonomous System Number -- **remote_ip_address** (String) The remote ip address of the vpn server -- **remote_networks** (List of String) The list of remote addresses -- **tunnel_configs** (List of Object) The configuration of the vpn tunnel (see [below for nested schema](#nestedatt--tunnel_configs)) -- **update_available** (Boolean) Activated if an update is available -- **vpn_connection_status** (String) The status of the vpn connection -- **vpn_tunnels** (List of Object) List of vpn tunnels configurations (see [below for nested schema](#nestedatt--vpn_tunnels)) +- `created_at` (String) The vpn creation time +- `failed_reason` (String) The error message if the vpn fails +- `local_asn` (Number) The local Autonomous System Number +- `name` (String) The name of the vpn. +- `remote_asn` (Number) The unique remote Autonomous System Number +- `remote_ip_address` (String) The remote ip address of the vpn server +- `remote_networks` (List of String) The list of remote addresses +- `tunnel_configs` (List of Object) The configuration of the vpn tunnel (see [below for nested schema](#nestedatt--tunnel_configs)) +- `update_available` (Boolean) Activated if an update is available +- `vpn_connection_status` (String) The status of the vpn connection +- `vpn_tunnels` (List of Object) List of vpn tunnels configurations (see [below for nested schema](#nestedatt--vpn_tunnels)) ### Nested Schema for `tunnel_configs` Read-Only: -- **psk** (String) -- **ptp_cidr** (String) -- **rekey_fuzz** (Number) -- **rekey_margin_in_seconds** (Number) +- `psk` (String) +- `ptp_cidr` (String) +- `rekey_fuzz` (Number) +- `rekey_margin_in_seconds` (Number) @@ -63,13 +63,13 @@ Read-Only: Read-Only: -- **accepted_route_count** (Number) -- **last_status_change** (String) -- **local_external_ip_address** (String) -- **local_ptp_ip_address** (String) -- **psk** (String) -- **remote_ptp_ip_address** (String) -- **status** (String) -- **status_message** (String) +- `accepted_route_count` (Number) +- `last_status_change` (String) +- `local_external_ip_address` (String) +- `local_ptp_ip_address` (String) +- `psk` (String) +- `remote_ptp_ip_address` (String) +- `status` (String) +- `status_message` (String) diff --git a/docs/index.md b/docs/index.md index efb5ab3..ea9c841 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ This project is not an official Mulesoft product, it is an open-source initiativ Any contribution is welcome. If you're interested in this project, please get in touch 📧. -Join our Discord [server](https://discord.gg/ApZBgfeY) !! +Join our Discord [server](https://discord.gg/YrFr5CRW) !! ## Example Usage @@ -31,6 +31,8 @@ provider "anypoint" { client_id = var.client_id # optionally use ANYPOINT_CLIENT_ID env var client_secret = var.client_secret # optionally use ANYPOINT_CLIENT_SECRET env var + access_token = var.access_token # optionally use ANYPOINT_ACCESS_TOKEN env var + # You may need to change the anypoint control plane: use 'eu' or 'us' # by default the control plane is 'us' cplane= var.cplane # optionnaly use ANYPOINT_CPLANE env var @@ -42,8 +44,9 @@ provider "anypoint" { ### Optional -- **client_id** (String, Sensitive) the connected app's id -- **client_secret** (String, Sensitive) the connected app's secret -- **cplane** (String) the anypoint control plane -- **password** (String, Sensitive) the user's password -- **username** (String, Sensitive) the user's username \ No newline at end of file +- `access_token` (String, Sensitive) the connected app's access token +- `client_id` (String, Sensitive) the connected app's id +- `client_secret` (String, Sensitive) the connected app's secret +- `cplane` (String) the anypoint control plane +- `password` (String, Sensitive) the user's password +- `username` (String, Sensitive) the user's username \ No newline at end of file diff --git a/docs/resources/bg.md b/docs/resources/bg.md index 011d8bb..0f4994d 100644 --- a/docs/resources/bg.md +++ b/docs/resources/bg.md @@ -35,126 +35,126 @@ resource "anypoint_bg" "bg" { ### Required -- **name** (String) The name of this organization. -- **owner_id** (String) The user id of the owner of this organization. -- **parent_organization_id** (String) The immediate parent organization id of this organization. +- `name` (String) The name of this organization. +- `owner_id` (String) The user id of the owner of this organization. +- `parent_organization_id` (String) The immediate parent organization id of this organization. ### Optional -- **entitlements_anggovernance_level** (Number) -- **entitlements_anypointsecurityedgepolicies_enabled** (Boolean) Whether Anypoint security edge policies is enabled for this organization. -- **entitlements_anypointsecuritytokenization_enabled** (Boolean) whether Anypoint securirty tokenization is enabled for this organization. -- **entitlements_apicommunitymanager_enabled** (Boolean) Whether api community manager is enabled for this organization. -- **entitlements_apimonitoring_schedules** (Number) The number of api monitoring schedules for this organization. -- **entitlements_apiquery_enabled** (Boolean) Whether api queries are enabled for this organization. -- **entitlements_apiquery_productsku** (Number) The number of api query product sku for this organization. -- **entitlements_apiqueryc360_enabled** (Boolean) Whether api query C360 is enabled for this organization. -- **entitlements_apis_enabled** (Boolean) whether APIs are enabled for this organization. -- **entitlements_appviz** (Boolean) Whether the app vizualize if enabled for this organization. -- **entitlements_armalerts** (Boolean) Whether arm alerts are enabled for this organization. -- **entitlements_autoscaling** (Boolean) Whether autoscaling is enabled for this organization -- **entitlements_cam_enabled** (Boolean) Whether cam is enabled for this organization. -- **entitlements_createenvironments** (Boolean) Whether this organization can have additional environments. -- **entitlements_createsuborgs** (Boolean) Whether this organization can create sub organizations (descendants). -- **entitlements_crowd_environments** (Boolean) -- **entitlements_crowd_hideapimanagerdesigner** (Boolean) -- **entitlements_crowd_hideformerapiplatform** (Boolean) -- **entitlements_crowdselfservicemigration_enabled** (Boolean) Whether crow self service migration is enabled for this organization. -- **entitlements_designcenter_api** (Boolean) Whether te design center api is enabled for this organization. -- **entitlements_designcenter_mozart** (Boolean) Whether the design center mozart is enabled for this organization. -- **entitlements_exchange2_enabled** (Boolean) Whether exchange v2 is enabled for this organization. -- **entitlements_externalidentity** (Boolean) Whether an external identity provider (IDP) was assigned to this organization. -- **entitlements_gateways_assigned** (Number) The number of gateways assigned to this organization. -- **entitlements_globaldeployment** (Boolean) Whether this organization can have global deployments. -- **entitlements_kpidashboard_enabled** (Boolean) Whether KPI dashboard is enabled for this organization. -- **entitlements_loadbalancer_assigned** (Number) The number of dedicated load balancers (DLB) assigned to this organization. -- **entitlements_messaging_assigned** (Number) The number of messaging assigned to this organization. -- **entitlements_monitoringcenter_productsku** (Number) The number of monitoring center products sku for this organization. -- **entitlements_mqadvancedfeatures_enabled** (Boolean) Whether the Anypoint MQ advanced features are enabled for this organization. -- **entitlements_mqmessages_addon** (Number) The number of MQ messages addons assigned to this organization. -- **entitlements_mqmessages_base** (Number) The number of basic MQ messages assigned to this organization. -- **entitlements_mqrequests_addon** (Number) The number of MQ requests addon assigned to this organization. -- **entitlements_mqrequests_base** (Number) The number of MQ requests base assigned to this organization. -- **entitlements_objectstorekeys_addon** (Number) The number of object store keys addon for this organization. -- **entitlements_objectstorekeys_base** (Number) The number of object store keys base for this organization. -- **entitlements_objectstorerequestunits_addon** (Number) The number of object store requests units addon for this organization. -- **entitlements_objectstorerequestunits_base** (Number) The number of object store requests unists base for this organization. -- **entitlements_partnersproduction_assigned** (Number) The number of partners production vcores assigned to this organization. -- **entitlements_partnerssandbox_assigned** (Number) The number of partners sandbox vcores assigned to this organization. -- **entitlements_pcf** (Boolean) Whether PCF is included for this organization. -- **entitlements_runtimefabric** (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. -- **entitlements_runtimefabriccloud_enabled** (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. -- **entitlements_servicemesh_enabled** (Boolean) Whether Service Mesh is enabled for this organization. -- **entitlements_staticips_assigned** (Number) The number of static IPs assigned to this organization. -- **entitlements_tradingpartnersproduction_assigned** (Number) The number of traded partners production vcores assigned to this organization. -- **entitlements_tradingpartnerssandbox_assigned** (Number) The number of traded partners sandbox vcores assigned to this organization. -- **entitlements_vcoresdesign_assigned** (Number) The number of design vcores assigned to this organization. -- **entitlements_vcoresproduction_assigned** (Number) The number of production vcores assigned to this organization. -- **entitlements_vcoressandbox_assigned** (Number) The number of sandbox vcores assigned to this organization. -- **entitlements_vpcs_assigned** (Number) The number of VPCs assigned to this organization. -- **entitlements_vpns_assigned** (Number) The number of VPNs assigned to this organization. -- **entitlements_workerclouds_assigned** (Number) The number of worker clouds assigned to this organization -- **entitlements_workerloggingoverride_enabled** (Boolean) Whether the loggin override on workers is enabled for this organization. -- **is_federated** (Boolean) Whether this organization is federated. -- **last_updated** (String) The last time this resource has been updated locally. -- **session_timeout** (Number) The organization's session timeout +- `entitlements_anggovernance_level` (Number) +- `entitlements_anypointsecurityedgepolicies_enabled` (Boolean) Whether Anypoint security edge policies is enabled for this organization. +- `entitlements_anypointsecuritytokenization_enabled` (Boolean) whether Anypoint securirty tokenization is enabled for this organization. +- `entitlements_apicommunitymanager_enabled` (Boolean) Whether api community manager is enabled for this organization. +- `entitlements_apimonitoring_schedules` (Number) The number of api monitoring schedules for this organization. +- `entitlements_apiquery_enabled` (Boolean) Whether api queries are enabled for this organization. +- `entitlements_apiquery_productsku` (Number) The number of api query product sku for this organization. +- `entitlements_apiqueryc360_enabled` (Boolean) Whether api query C360 is enabled for this organization. +- `entitlements_apis_enabled` (Boolean) whether APIs are enabled for this organization. +- `entitlements_appviz` (Boolean) Whether the app vizualize if enabled for this organization. +- `entitlements_armalerts` (Boolean) Whether arm alerts are enabled for this organization. +- `entitlements_autoscaling` (Boolean) Whether autoscaling is enabled for this organization +- `entitlements_cam_enabled` (Boolean) Whether cam is enabled for this organization. +- `entitlements_createenvironments` (Boolean) Whether this organization can have additional environments. +- `entitlements_createsuborgs` (Boolean) Whether this organization can create sub organizations (descendants). +- `entitlements_crowd_environments` (Boolean) +- `entitlements_crowd_hideapimanagerdesigner` (Boolean) +- `entitlements_crowd_hideformerapiplatform` (Boolean) +- `entitlements_crowdselfservicemigration_enabled` (Boolean) Whether crow self service migration is enabled for this organization. +- `entitlements_designcenter_api` (Boolean) Whether te design center api is enabled for this organization. +- `entitlements_designcenter_mozart` (Boolean) Whether the design center mozart is enabled for this organization. +- `entitlements_exchange2_enabled` (Boolean) Whether exchange v2 is enabled for this organization. +- `entitlements_externalidentity` (Boolean) Whether an external identity provider (IDP) was assigned to this organization. +- `entitlements_gateways_assigned` (Number) The number of gateways assigned to this organization. +- `entitlements_globaldeployment` (Boolean) Whether this organization can have global deployments. +- `entitlements_kpidashboard_enabled` (Boolean) Whether KPI dashboard is enabled for this organization. +- `entitlements_loadbalancer_assigned` (Number) The number of dedicated load balancers (DLB) assigned to this organization. +- `entitlements_messaging_assigned` (Number) The number of messaging assigned to this organization. +- `entitlements_monitoringcenter_productsku` (Number) The number of monitoring center products sku for this organization. +- `entitlements_mqadvancedfeatures_enabled` (Boolean) Whether the Anypoint MQ advanced features are enabled for this organization. +- `entitlements_mqmessages_addon` (Number) The number of MQ messages addons assigned to this organization. +- `entitlements_mqmessages_base` (Number) The number of basic MQ messages assigned to this organization. +- `entitlements_mqrequests_addon` (Number) The number of MQ requests addon assigned to this organization. +- `entitlements_mqrequests_base` (Number) The number of MQ requests base assigned to this organization. +- `entitlements_objectstorekeys_addon` (Number) The number of object store keys addon for this organization. +- `entitlements_objectstorekeys_base` (Number) The number of object store keys base for this organization. +- `entitlements_objectstorerequestunits_addon` (Number) The number of object store requests units addon for this organization. +- `entitlements_objectstorerequestunits_base` (Number) The number of object store requests unists base for this organization. +- `entitlements_partnersproduction_assigned` (Number) The number of partners production vcores assigned to this organization. +- `entitlements_partnerssandbox_assigned` (Number) The number of partners sandbox vcores assigned to this organization. +- `entitlements_pcf` (Boolean) Whether PCF is included for this organization. +- `entitlements_runtimefabric` (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. +- `entitlements_runtimefabriccloud_enabled` (Boolean) Whether Runtime Fabrics (RTF) is enabled for this organization. +- `entitlements_servicemesh_enabled` (Boolean) Whether Service Mesh is enabled for this organization. +- `entitlements_staticips_assigned` (Number) The number of static IPs assigned to this organization. +- `entitlements_tradingpartnersproduction_assigned` (Number) The number of traded partners production vcores assigned to this organization. +- `entitlements_tradingpartnerssandbox_assigned` (Number) The number of traded partners sandbox vcores assigned to this organization. +- `entitlements_vcoresdesign_assigned` (Number) The number of design vcores assigned to this organization. +- `entitlements_vcoresproduction_assigned` (Number) The number of production vcores assigned to this organization. +- `entitlements_vcoressandbox_assigned` (Number) The number of sandbox vcores assigned to this organization. +- `entitlements_vpcs_assigned` (Number) The number of VPCs assigned to this organization. +- `entitlements_vpns_assigned` (Number) The number of VPNs assigned to this organization. +- `entitlements_workerclouds_assigned` (Number) The number of worker clouds assigned to this organization +- `entitlements_workerloggingoverride_enabled` (Boolean) Whether the loggin override on workers is enabled for this organization. +- `is_federated` (Boolean) Whether this organization is federated. +- `last_updated` (String) The last time this resource has been updated locally. +- `session_timeout` (Number) The organization's session timeout ### Read-Only -- **client_id** (String) The organization client id. -- **created_at** (String) The time when this organization was created. -- **domain** (String) The organization's domain -- **entitlements_hybridautodiscoverproperties** (Boolean) Whether this organization has hybrid auto-discovery properties enabled -- **entitlements_hybridenabled** (Boolean) Whether this organization has hybrid enabled. -- **entitlements_hybridinsight** (Boolean) Whether this organization has hybrid insight. -- **entitlements_loadbalancer_reassigned** (Number) The number of dedicated load balancers (DLB) reassigned to this organization. -- **entitlements_staticips_reassigned** (Number) The number of static IPs reassigned to this organization. -- **entitlements_vcoresdesign_reassigned** (Number) The number of design vcores reassigned to this organization. -- **entitlements_vcoresproduction_reassigned** (Number) The number of production vcores reassigned to this organization. -- **entitlements_vcoressandbox_reassigned** (Number) The number of sandbox vcores reassigned to this organization. -- **entitlements_vpcs_reassigned** (Number) The number of VPCs reassigned to this organization. -- **entitlements_vpns_reassigned** (Number) The number of VPNs reassigned to this organization. -- **entitlements_workerclouds_reassigned** (Number) The number of worker clouds reassigned to this organization -- **environments** (List of Object) The organization's list of environments (see [below for nested schema](#nestedatt--environments)) -- **id** (String) This organization's unique id generated by the anypoint plaform -- **idprovider_id** (String) The identity provider if of this organization -- **is_automatic_admin_promotion_exempt** (Boolean) Whether the admin promotion exemption is enabled on this organization -- **is_master** (Boolean) Whether this organization is the master org. -- **mfa_required** (String) Whether MFA is enforced in this organization -- **owner_created_at** (String) the organization owner creation date -- **owner_deleted** (Boolean) Whether the organization owner account is deleted. -- **owner_email** (String, Sensitive) The organization owner's email. -- **owner_enabled** (Boolean) Whether the organization owner account is enabled. -- **owner_firstname** (String, Sensitive) The organization owner's firstname -- **owner_idprovider_id** (String) The organization owner identity provider id. -- **owner_lastlogin** (String) The last time the organization owner logged in. -- **owner_lastname** (String, Sensitive) The organization owner's lastname. -- **owner_mfaverification_excluded** (Boolean) Whether the organization owner MFA verification is excluded. -- **owner_mfaverifiers_configured** (String) The organization owner MFA verification configuration -- **owner_organization_id** (String) The organization owner's organization id. -- **owner_phonenumber** (String, Sensitive) The organization owner's phone number. -- **owner_type** (String) The organization owner account type. -- **owner_updated_at** (String) The organization owner update date. -- **owner_username** (String) The organization owner username. -- **parent_organization_ids** (List of String) Array of ancestor organizations. -- **properties** (String) The organiztion's general properties. -- **sub_organization_ids** (List of String) Array of descendant organizations. -- **subscription_category** (String) The anypoint platform subscription category -- **subscription_expiration** (String) The anypoint platform subscription expiration date. -- **subscription_type** (String) The anypoint platform subscription type. -- **tenant_organization_ids** (List of String) Array of tenant organizations -- **updated_at** (String) The time when this organization was updated. +- `client_id` (String) The organization client id. +- `created_at` (String) The time when this organization was created. +- `domain` (String) The organization's domain +- `entitlements_hybridautodiscoverproperties` (Boolean) Whether this organization has hybrid auto-discovery properties enabled +- `entitlements_hybridenabled` (Boolean) Whether this organization has hybrid enabled. +- `entitlements_hybridinsight` (Boolean) Whether this organization has hybrid insight. +- `entitlements_loadbalancer_reassigned` (Number) The number of dedicated load balancers (DLB) reassigned to this organization. +- `entitlements_staticips_reassigned` (Number) The number of static IPs reassigned to this organization. +- `entitlements_vcoresdesign_reassigned` (Number) The number of design vcores reassigned to this organization. +- `entitlements_vcoresproduction_reassigned` (Number) The number of production vcores reassigned to this organization. +- `entitlements_vcoressandbox_reassigned` (Number) The number of sandbox vcores reassigned to this organization. +- `entitlements_vpcs_reassigned` (Number) The number of VPCs reassigned to this organization. +- `entitlements_vpns_reassigned` (Number) The number of VPNs reassigned to this organization. +- `entitlements_workerclouds_reassigned` (Number) The number of worker clouds reassigned to this organization +- `environments` (List of Object) The organization's list of environments (see [below for nested schema](#nestedatt--environments)) +- `id` (String) This organization's unique id generated by the anypoint plaform +- `idprovider_id` (String) The identity provider if of this organization +- `is_automatic_admin_promotion_exempt` (Boolean) Whether the admin promotion exemption is enabled on this organization +- `is_master` (Boolean) Whether this organization is the master org. +- `mfa_required` (String) Whether MFA is enforced in this organization +- `owner_created_at` (String) the organization owner creation date +- `owner_deleted` (Boolean) Whether the organization owner account is deleted. +- `owner_email` (String, Sensitive) The organization owner's email. +- `owner_enabled` (Boolean) Whether the organization owner account is enabled. +- `owner_firstname` (String, Sensitive) The organization owner's firstname +- `owner_idprovider_id` (String) The organization owner identity provider id. +- `owner_lastlogin` (String) The last time the organization owner logged in. +- `owner_lastname` (String, Sensitive) The organization owner's lastname. +- `owner_mfaverification_excluded` (Boolean) Whether the organization owner MFA verification is excluded. +- `owner_mfaverifiers_configured` (String) The organization owner MFA verification configuration +- `owner_organization_id` (String) The organization owner's organization id. +- `owner_phonenumber` (String, Sensitive) The organization owner's phone number. +- `owner_type` (String) The organization owner account type. +- `owner_updated_at` (String) The organization owner update date. +- `owner_username` (String) The organization owner username. +- `parent_organization_ids` (List of String) Array of ancestor organizations. +- `properties` (String) The organiztion's general properties. +- `sub_organization_ids` (List of String) Array of descendant organizations. +- `subscription_category` (String) The anypoint platform subscription category +- `subscription_expiration` (String) The anypoint platform subscription expiration date. +- `subscription_type` (String) The anypoint platform subscription type. +- `tenant_organization_ids` (List of String) Array of tenant organizations +- `updated_at` (String) The time when this organization was updated. ### Nested Schema for `environments` Read-Only: -- **client_id** (String) -- **id** (String) -- **is_production** (Boolean) -- **name** (String) -- **organization_id** (String) -- **type** (String) +- `client_id` (String) +- `id` (String) +- `is_production` (Boolean) +- `name` (String) +- `organization_id` (String) +- `type` (String) diff --git a/docs/resources/dlb.md b/docs/resources/dlb.md index be6b20c..d09a5da 100644 --- a/docs/resources/dlb.md +++ b/docs/resources/dlb.md @@ -41,72 +41,72 @@ resource "anypoint_dlb" "dlb" { ### Required -- **name** (String) The name of the dlb. -- **org_id** (String) The organization id where the dlb is defined. -- **vpc_id** (String) The vpc id +- `name` (String) The name of the dlb. +- `org_id` (String) The organization id where the dlb is defined. +- `vpc_id` (String) The vpc id ### Optional -- **default_ssl_endpoint** (Number) The default certificate that will be served for requests not using SNI, or requesting a non-existing certificate -- **domain** (String) The domain name of this dlb -- **double_static_ips** (Boolean) True if DLB will use double static IPs when restarting -- **enable_streaming** (Boolean) Setting this to true will disable request buffering at the DLB, thereby enabling streaming -- **forward_client_certificate** (Boolean) Setting this to true will forward any incoming client certificates to upstream application -- **http_mode** (String) Specifies whether the Load Balancer listens for HTTP requests on port 80. If set to redirect, all HTTP requests will be redirected to HTTPS. possible values: 'on', 'off' or 'redirect' -- **ip_allowlist** (List of String) CIDR blocks to allow connections from -- **ip_whitelist** (List of String) CIDR blocks to allow connections from -- **keep_url_encoding** (Boolean) Whether to keep url encoding for this dlb. -- **last_updated** (String) The last time this resource has been updated locally. -- **ssl_endpoints** (Block Set) (see [below for nested schema](#nestedblock--ssl_endpoints)) -- **state** (String) The desired state, possible values: 'started', 'stopped' or 'restarted' -- **tlsv1** (Boolean) Whether to activate TLS v1 for this dlb. -- **upstream_tlsv12** (Boolean) Whether to activate TLS v1.2 for this dlb upstream. +- `default_ssl_endpoint` (Number) The default certificate that will be served for requests not using SNI, or requesting a non-existing certificate +- `domain` (String) The domain name of this dlb +- `double_static_ips` (Boolean) True if DLB will use double static IPs when restarting +- `enable_streaming` (Boolean) Setting this to true will disable request buffering at the DLB, thereby enabling streaming +- `forward_client_certificate` (Boolean) Setting this to true will forward any incoming client certificates to upstream application +- `http_mode` (String) Specifies whether the Load Balancer listens for HTTP requests on port 80. If set to redirect, all HTTP requests will be redirected to HTTPS. possible values: 'on', 'off' or 'redirect' +- `ip_allowlist` (List of String) CIDR blocks to allow connections from +- `ip_whitelist` (List of String) CIDR blocks to allow connections from +- `keep_url_encoding` (Boolean) Whether to keep url encoding for this dlb. +- `last_updated` (String) The last time this resource has been updated locally. +- `ssl_endpoints` (Block Set) (see [below for nested schema](#nestedblock--ssl_endpoints)) +- `state` (String) The desired state, possible values: 'started', 'stopped' or 'restarted' +- `tlsv1` (Boolean) Whether to activate TLS v1 for this dlb. +- `upstream_tlsv12` (Boolean) Whether to activate TLS v1.2 for this dlb upstream. ### Read-Only -- **default_cipher_suite** (String) The default cipher suite used by this dlb. -- **deployment_id** (String) -- **id** (String) The unique id of this dlb generated by the anypoint platform. -- **instance_config** (Map of String) -- **ip_addresses** (List of String) List of static IP addresses for this dlb -- **ip_addresses_info** (List of Object) List of IP addresses information of this dlb. (see [below for nested schema](#nestedatt--ip_addresses_info)) -- **proxy_read_timeout** (Number) The proxy read timeout -- **static_ips_disabled** (Boolean) Whether to disable static ips for this dlb. -- **workers** (Number) The number of workers for this dlb. +- `default_cipher_suite` (String) The default cipher suite used by this dlb. +- `deployment_id` (String) +- `id` (String) The unique id of this dlb generated by the anypoint platform. +- `instance_config` (Map of String) +- `ip_addresses` (List of String) List of static IP addresses for this dlb +- `ip_addresses_info` (List of Object) List of IP addresses information of this dlb. (see [below for nested schema](#nestedatt--ip_addresses_info)) +- `proxy_read_timeout` (Number) The proxy read timeout +- `static_ips_disabled` (Boolean) Whether to disable static ips for this dlb. +- `workers` (Number) The number of workers for this dlb. ### Nested Schema for `ssl_endpoints` Required: -- **private_key** (String, Sensitive) The private key of the given endpoint -- **public_key** (String, Sensitive) The public key of the given endpoint. +- `private_key` (String, Sensitive) The private key of the given endpoint +- `public_key` (String, Sensitive) The public key of the given endpoint. Optional: -- **mappings** (Block Set) List of dlb mappings. (see [below for nested schema](#nestedblock--ssl_endpoints--mappings)) -- **private_key_label** (String) The label of the private key. -- **public_key_label** (String) The label of the public key. -- **verify_client_mode** (String) Whether to enable client verification or not, possible values: 'off' or 'on' +- `mappings` (Block Set) List of dlb mappings. (see [below for nested schema](#nestedblock--ssl_endpoints--mappings)) +- `private_key_label` (String) The label of the private key. +- `public_key_label` (String) The label of the public key. +- `verify_client_mode` (String) Whether to enable client verification or not, possible values: 'off' or 'on' Read-Only: -- **private_key_digest** (String) The private key checksum generated by the anypoint platform. -- **public_key_cn** (String) The common name of the public key. -- **public_key_digest** (String) The public key checksum generated by the anypoint platform. +- `private_key_digest` (String) The private key checksum generated by the anypoint platform. +- `public_key_cn` (String) The common name of the public key. +- `public_key_digest` (String) The public key checksum generated by the anypoint platform. ### Nested Schema for `ssl_endpoints.mappings` Required: -- **app_name** (String) -- **app_uri** (String) -- **input_uri** (String) +- `app_name` (String) +- `app_uri` (String) +- `input_uri` (String) Read-Only: -- **upstream_protocol** (String) +- `upstream_protocol` (String) @@ -115,8 +115,8 @@ Read-Only: Read-Only: -- **ip** (String) -- **static_ip** (Boolean) -- **status** (String) +- `ip` (String) +- `static_ip` (Boolean) +- `status` (String) diff --git a/docs/resources/env.md b/docs/resources/env.md index 56a4faf..37224f0 100644 --- a/docs/resources/env.md +++ b/docs/resources/env.md @@ -25,19 +25,19 @@ resource "anypoint_env" "env" { ### Required -- **name** (String) The name of the environment -- **org_id** (String) The organization id where the environment is defined. -- **type** (String) The type of the environment: sandbox or production +- `name` (String) The name of the environment +- `org_id` (String) The organization id where the environment is defined. +- `type` (String) The type of the environment: sandbox or production ### Optional -- **client_id** (String) -- **is_production** (Boolean) True if the environment is a production environment -- **last_updated** (String) The last time this resource has been updated locally. +- `client_id` (String) +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **id** (String) The unique id of this environment generated by the anypoint platform. -- **organization_id** (String) The organization id where the environment is defined. +- `id` (String) The unique id of this environment generated by the anypoint platform. +- `is_production` (Boolean) True if the environment is a production environment +- `organization_id` (String) The organization id where the environment is defined. diff --git a/docs/resources/idp_oidc.md b/docs/resources/idp_oidc.md index 39c2280..5091f5c 100644 --- a/docs/resources/idp_oidc.md +++ b/docs/resources/idp_oidc.md @@ -53,43 +53,43 @@ resource "anypoint_idp_oidc" "example2" { ### Required -- **name** (String) The name of the identity provider -- **oidc_provider** (Block Set, Min: 1) The description of provider specific for OIDC types (see [below for nested schema](#nestedblock--oidc_provider)) -- **org_id** (String) The master organization id where the idp is defined. +- `name` (String) The name of the identity provider +- `oidc_provider` (Block Set, Min: 1) The description of provider specific for OIDC types (see [below for nested schema](#nestedblock--oidc_provider)) +- `org_id` (String) The master organization id where the idp is defined. ### Optional -- **last_updated** (String) The last time this resource has been updated locally. +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **id** (String) The unique id of this identity provider generated by the anypoint platform. -- **provider_id** (String) The identity provider unique generated id -- **sp_sign_on_url** (String) The provider's sign on url -- **sp_sign_out_url** (String) The provider's sign out url, only available for SAML -- **type** (Map of String) The type of the identity provider, contains description and the name of the type of the provider (saml or oidc) +- `id` (String) The unique id of this identity provider generated by the anypoint platform. +- `provider_id` (String) The identity provider unique generated id +- `sp_sign_on_url` (String) The provider's sign on url +- `sp_sign_out_url` (String) The provider's sign out url, only available for SAML +- `type` (Map of String) The type of the identity provider, contains description and the name of the type of the provider (saml or oidc) ### Nested Schema for `oidc_provider` Required: -- **authorize_url** (String) The authorization url of the openid-connect provider -- **issuer** (String) The provider token issuer url -- **token_url** (String) The token url of the openid-connect provider -- **userinfo_url** (String) The userinfo url of the openid-connect provider +- `authorize_url` (String) The authorization url of the openid-connect provider +- `issuer` (String) The provider token issuer url +- `token_url` (String) The token url of the openid-connect provider +- `userinfo_url` (String) The userinfo url of the openid-connect provider Optional: -- **allow_untrusted_certificates** (Boolean) The certification validation trigger -- **client_credentials_id** (String) The client's credentials id. This should only be provided if manual registration is wanted. Mutually exclusive with registration url, if both are given registration url is prioritized. -- **client_credentials_secret** (String, Sensitive) The client's credentials secret. This should only be provided if manual registration is wanted. Mutually exclusive with registration url, if both are given registration url is prioritized. -- **client_registration_url** (String) The registration url, for dynamic client registration, of the openid-connect provider. Mutually exclusive with credentials id/secret, if both are given registration url is prioritized. -- **group_scope** (String) The provider group scopes +- `allow_untrusted_certificates` (Boolean) The certification validation trigger +- `client_credentials_id` (String) The client's credentials id. This should only be provided if manual registration is wanted. Mutually exclusive with registration url, if both are given registration url is prioritized. +- `client_credentials_secret` (String, Sensitive) The client's credentials secret. This should only be provided if manual registration is wanted. Mutually exclusive with registration url, if both are given registration url is prioritized. +- `client_registration_url` (String) The registration url, for dynamic client registration, of the openid-connect provider. Mutually exclusive with credentials id/secret, if both are given registration url is prioritized. +- `group_scope` (String) The provider group scopes Read-Only: -- **client_token_endpoint_auth_methods_supported** (List of String) The list of authentication methods supported -- **redirect_url** (String) The redirect url of the openid-connect provider +- `client_token_endpoint_auth_methods_supported` (List of String) The list of authentication methods supported +- `redirect_url` (String) The redirect url of the openid-connect provider diff --git a/docs/resources/idp_saml.md b/docs/resources/idp_saml.md index 93944c3..6b62c3a 100644 --- a/docs/resources/idp_saml.md +++ b/docs/resources/idp_saml.md @@ -59,40 +59,40 @@ resource "anypoint_idp_saml" "example2" { ### Required -- **name** (String) The name of the identity provider -- **org_id** (String) The master organization id where the team is defined. -- **saml** (Block Set, Min: 1) The description of identity provider specific for SAML types (see [below for nested schema](#nestedblock--saml)) -- **sp_sign_on_url** (String) The identity provider's sign on url -- **sp_sign_out_url** (String) The identity provider's sign out url, only available for SAML +- `name` (String) The name of the identity provider +- `org_id` (String) The master organization id where the team is defined. +- `saml` (Block Set, Min: 1) The description of identity provider specific for SAML types (see [below for nested schema](#nestedblock--saml)) +- `sp_sign_on_url` (String) The identity provider's sign on url +- `sp_sign_out_url` (String) The identity provider's sign out url, only available for SAML ### Optional -- **last_updated** (String) The last time this resource has been updated locally. +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **id** (String) The unique id of this identity provider generated by the anypoint platform. -- **provider_id** (String) The identity provider unique generated id -- **type** (Map of String) The type of the identity provider, contains description and the name of the type of the provider (saml or oidc) +- `id` (String) The unique id of this identity provider generated by the anypoint platform. +- `provider_id` (String) The identity provider unique generated id +- `type` (Map of String) The type of the identity provider, contains description and the name of the type of the provider (saml or oidc) ### Nested Schema for `saml` Required: -- **audience** (String) The provider audience -- **issuer** (String) The provider issuer -- **public_key** (List of String) The list of public keys +- `audience` (String) The provider audience +- `issuer` (String) The provider issuer +- `public_key` (List of String) The list of public keys Optional: -- **claims_mapping_email_attribute** (String) Field name in the SAML AttributeStatements that maps to Email. By default, the email attribute in the SAML assertion is used. -- **claims_mapping_firstname_attribute** (String) Field name in the SAML AttributeStatements that maps to First Name. By default, the firstname attribute in the SAML assertion is used. -- **claims_mapping_group_attribute** (String) Field name in the SAML AttributeStatements that maps to Group. -- **claims_mapping_lastname_attribute** (String) Field name in the SAML AttributeStatements that maps to Last Name. By default, the lastname attribute in the SAML assertion is used. -- **claims_mapping_username_attribute** (String) Field name in the SAML AttributeStatements that maps to username. By default, the NameID attribute in the SAML assertion is used. -- **idp_initiated_sso_enabled** (Boolean) True if the Identity Provider initiated SSO enabled -- **require_encrypted_saml_assertions** (Boolean) True if the encryption of saml assertions requirement is enabled -- **sp_initiated_sso_enabled** (Boolean) True if the Service Provider initiated SSO enabled +- `claims_mapping_email_attribute` (String) Field name in the SAML AttributeStatements that maps to Email. By default, the email attribute in the SAML assertion is used. +- `claims_mapping_firstname_attribute` (String) Field name in the SAML AttributeStatements that maps to First Name. By default, the firstname attribute in the SAML assertion is used. +- `claims_mapping_group_attribute` (String) Field name in the SAML AttributeStatements that maps to Group. +- `claims_mapping_lastname_attribute` (String) Field name in the SAML AttributeStatements that maps to Last Name. By default, the lastname attribute in the SAML assertion is used. +- `claims_mapping_username_attribute` (String) Field name in the SAML AttributeStatements that maps to username. By default, the NameID attribute in the SAML assertion is used. +- `idp_initiated_sso_enabled` (Boolean) True if the Identity Provider initiated SSO enabled +- `require_encrypted_saml_assertions` (Boolean) True if the encryption of saml assertions requirement is enabled +- `sp_initiated_sso_enabled` (Boolean) True if the Service Provider initiated SSO enabled diff --git a/docs/resources/rolegroup.md b/docs/resources/rolegroup.md index b37e4ca..362bb2c 100644 --- a/docs/resources/rolegroup.md +++ b/docs/resources/rolegroup.md @@ -26,21 +26,21 @@ resource "anypoint_rolegroup" "rg" { ### Required -- **name** (String) the name of the role-group -- **org_id** (String) The master orgnization id where the role-group is defined +- `name` (String) the name of the role-group +- `org_id` (String) The master orgnization id where the role-group is defined ### Optional -- **description** (String) The description of the role-group -- **external_names** (List of String) List of external names of the role-group -- **last_updated** (String) The last time this resource has been updated locally. +- `description` (String) The description of the role-group +- `external_names` (List of String) List of external names of the role-group +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **created_at** (String) The role-group creation date -- **editable** (Boolean) Whether the role-group is editable -- **id** (String) The unique id of this role-group generated by the anypoint platform. -- **role_group_id** (String) The role-group generated id -- **updated_at** (String) The role-group update date +- `created_at` (String) The role-group creation date +- `editable` (Boolean) Whether the role-group is editable +- `id` (String) The unique id of this role-group generated by the anypoint platform. +- `role_group_id` (String) The role-group generated id +- `updated_at` (String) The role-group update date diff --git a/docs/resources/rolegroup_roles.md b/docs/resources/rolegroup_roles.md index 0eae395..1ca7a7b 100644 --- a/docs/resources/rolegroup_roles.md +++ b/docs/resources/rolegroup_roles.md @@ -39,34 +39,34 @@ resource "anypoint_rolegroup_roles" "rg_roles" { ### Required -- **org_id** (String) The business group id -- **role_group_id** (String) The role-group id -- **roles** (Block List, Min: 1) List of roles in the role group (see [below for nested schema](#nestedblock--roles)) +- `org_id` (String) The business group id +- `role_group_id` (String) The role-group id +- `roles` (Block List, Min: 1) List of roles in the role group (see [below for nested schema](#nestedblock--roles)) ### Optional -- **id** (String) The unique id of this rolegroup-roles resource composed by `org_id`_`role_group_id` +- `id` (String) The unique id of this rolegroup-roles resource composed by `org_id`_`role_group_id` ### Read-Only -- **total** (Number) Total number of roles attributed to the role group +- `total` (Number) Total number of roles attributed to the role group ### Nested Schema for `roles` Required: -- **role_id** (String) +- `role_id` (String) Read-Only: -- **context_params** (Map of String) -- **created_at** (String) -- **description** (String) -- **internal** (Boolean) -- **name** (String) -- **org_id** (String) -- **role_group_assignment_id** (String) -- **role_group_id** (String) +- `context_params` (Map of String) +- `created_at` (String) +- `description` (String) +- `internal` (Boolean) +- `name` (String) +- `org_id` (String) +- `role_group_assignment_id` (String) +- `role_group_id` (String) diff --git a/docs/resources/team.md b/docs/resources/team.md index fe8679e..39d087c 100644 --- a/docs/resources/team.md +++ b/docs/resources/team.md @@ -30,15 +30,14 @@ output "team" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **parent_team_id** (String) The team_id of the parent of this team. -- **team_name** (String) The name of the team. Name is unique among teams within the organization. +- `org_id` (String) The master organization id where the team is defined. +- `parent_team_id` (String) The team_id of the parent of this team. +- `team_name` (String) The name of the team. Name is unique among teams within the organization. ### Optional -- **ancestor_team_ids** (List of String) Array of ancestor teams ids starting from either the internal or external root team down to this team's parent. -- **last_updated** (String) The last time this resource has been updated locally. -- **team_type** (String) The type of the team. Internal teams are visible to all members of the organziation. +- `last_updated` (String) The last time this resource has been updated locally. +- `team_type` (String) The type of the team. Internal teams are visible to all members of the organziation. All internal teams of an organization are under the root internal team. Private teams are internal teams but are only visible by maintainers/members of the team. Shared teams are internal teams that can be mapped to external teams in other organizations where a trust relationship has been formed. @@ -46,9 +45,10 @@ output "team" { ### Read-Only -- **created_at** (String) The time the team was created. -- **id** (String) The unique id of this team generated by the anypoint platform. -- **team_id** (String) The id of the team. team_id is globally unique -- **updated_at** (String) The time the team was last modified. +- `ancestor_team_ids` (List of String) Array of ancestor teams ids starting from either the internal or external root team down to this team's parent. +- `created_at` (String) The time the team was created. +- `id` (String) The unique id of this team generated by the anypoint platform. +- `team_id` (String) The id of the team. team_id is globally unique +- `updated_at` (String) The time the team was last modified. diff --git a/docs/resources/team_group_mappings.md b/docs/resources/team_group_mappings.md index 1f09a73..1611de3 100644 --- a/docs/resources/team_group_mappings.md +++ b/docs/resources/team_group_mappings.md @@ -40,29 +40,29 @@ resource "anypoint_team_group_mappings" "team_gmap" { ### Required -- **groupmappings** (Block List, Min: 1) The list of external identity provider groups that should be mapped to the given team. (see [below for nested schema](#nestedblock--groupmappings)) -- **org_id** (String) The master organization id where the team is defined. -- **team_id** (String) The id of the team. team_id is globally unique +- `groupmappings` (Block List, Min: 1) The list of external identity provider groups that should be mapped to the given team. (see [below for nested schema](#nestedblock--groupmappings)) +- `org_id` (String) The master organization id where the team is defined. +- `team_id` (String) The id of the team. team_id is globally unique ### Optional -- **last_updated** (String) The last time this resource has been updated locally. +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **id** (String) The unique id of this group mappings composed by `org_id`_`team_id`_groupmappings -- **total** (Number) The total number of group-mappings +- `id` (String) The unique id of this group mappings composed by `org_id`_`team_id`_groupmappings +- `total` (Number) The total number of group-mappings ### Nested Schema for `groupmappings` Required: -- **external_group_name** (String) The group name in the external identity provider that should be mapped to this team. -- **membership_type** (String) Whether the mapped member is a regular member or a maintainer. Only users may be team maintainers. Enum values: member, maintainer +- `external_group_name` (String) The group name in the external identity provider that should be mapped to this team. +- `membership_type` (String) Whether the mapped member is a regular member or a maintainer. Only users may be team maintainers. Enum values: member, maintainer Optional: -- **provider_id** (String) The id of the identity provider in anypoint platform. +- `provider_id` (String) The id of the identity provider in anypoint platform. diff --git a/docs/resources/team_member.md b/docs/resources/team_member.md index 589fe97..750f551 100644 --- a/docs/resources/team_member.md +++ b/docs/resources/team_member.md @@ -25,22 +25,22 @@ resource "anypoint_team_member" "team_member" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **team_id** (String) The id of the team. team_id is globally unique. -- **user_id** (String) The owner id +- `org_id` (String) The master organization id where the team is defined. +- `team_id` (String) The id of the team. team_id is globally unique. +- `user_id` (String) The owner id ### Optional -- **last_updated** (String) The last time this resource has been updated locally. -- **membership_type** (String) Whether the member is a regular member or a maintainer. Only users may be team maintainers. Enum values: member, maintainer +- `last_updated` (String) The last time this resource has been updated locally. +- `membership_type` (String) Whether the member is a regular member or a maintainer. Only users may be team maintainers. Enum values: member, maintainer ### Read-Only -- **created_at** (String) The member team assignment creation date -- **id** (String) The unique id of this team membership composed by `org_id`_`team_id`_`user_id`_members -- **identity_type** (String) The member's identity type. -- **is_assigned_via_external_groups** (Boolean) Whether the member was assigned to the team via a external group mapping -- **name** (String) The name of the team -- **updated_at** (String) The member team assignment update date +- `created_at` (String) The member team assignment creation date +- `id` (String) The unique id of this team membership composed by `org_id`_`team_id`_`user_id`_members +- `identity_type` (String) The member's identity type. +- `is_assigned_via_external_groups` (Boolean) Whether the member was assigned to the team via a external group mapping +- `name` (String) The name of the team +- `updated_at` (String) The member team assignment update date diff --git a/docs/resources/team_roles.md b/docs/resources/team_roles.md index 113876e..38eb671 100644 --- a/docs/resources/team_roles.md +++ b/docs/resources/team_roles.md @@ -41,29 +41,26 @@ resource "anypoint_team_roles" "roles" { ### Required -- **org_id** (String) The master organization id where the team is defined. -- **roles** (Block List, Min: 1) The roles (permissions) of the team. (see [below for nested schema](#nestedblock--roles)) -- **team_id** (String) The id of the team. team_id is globally unique. - -### Optional - -- **last_updated** (String) The last time this resource has been updated locally. +- `org_id` (String) The master organization id where the team is defined. +- `roles` (Block List, Min: 1) The roles (permissions) of the team. (see [below for nested schema](#nestedblock--roles)) +- `team_id` (String) The id of the team. team_id is globally unique. ### Read-Only -- **id** (String) The unique id of this team roles composed by `org_id`_`team_id`_roles -- **total** (Number) The total number of roles within the team +- `id` (String) The unique id of this team roles composed by `org_id`_`team_id`_roles +- `last_updated` (String) The last time this resource has been updated locally. +- `total` (Number) The total number of roles within the team ### Nested Schema for `roles` Required: -- **context_params** (Map of String) The role's scope. Contains the organisation id to which the role is applied and optionally if the role spans environments, the environment within the organization id. -- **role_id** (String) The role id +- `context_params` (Map of String) The role's scope. Contains the organisation id to which the role is applied and optionally if the role spans environments, the environment within the organization id. +- `role_id` (String) The role id Read-Only: -- **name** (String) The role name +- `name` (String) The role name diff --git a/docs/resources/user.md b/docs/resources/user.md index 64b40ff..fcbec29 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -38,36 +38,36 @@ output "user" { ### Required -- **email** (String, Sensitive) The email of this user. -- **first_name** (String, Sensitive) The firstname of this user. -- **last_name** (String, Sensitive) The lastname of this user. -- **org_id** (String) The master organization id where the user is defined. -- **password** (String, Sensitive) The password of this user. -- **phone_number** (String, Sensitive) The phone number of this user. -- **username** (String) The username of this user. +- `email` (String, Sensitive) The email of this user. +- `first_name` (String, Sensitive) The firstname of this user. +- `last_name` (String, Sensitive) The lastname of this user. +- `org_id` (String) The master organization id where the user is defined. +- `password` (String, Sensitive) The password of this user. +- `phone_number` (String, Sensitive) The phone number of this user. +- `username` (String) The username of this user. ### Optional -- **last_updated** (String) The last time this resource has been updated locally. +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **contributor_of_organizations** (Set of Map of String) The list of organizations this user has contributed to. -- **created_at** (String) The time when the user was created. -- **deleted** (Boolean) Whether this user is deleted -- **enabled** (Boolean) Whether this user is enabled -- **id** (String) The unique id of this user generated by the anypoint platform. -- **idprovider_id** (String) The identity provider id -- **is_federated** (Boolean) Whether this user is federated. -- **last_login** (String) The last time this user logged in. -- **member_of_organizations** (Set of Map of String) The user's list of organizations membership -- **mfa_verification_excluded** (Boolean) Whether MFA verification is excluded for this user -- **mfa_verifiers_configured** (String) The MFA configured for this user. -- **organization** (Map of String) The organization information -- **organization_id** (String) The master organization id where the user is defined. -- **organization_preferences** (Map of String) The preferences of the user within the organization. -- **properties** (String) The user's properties. -- **type** (String) The type of user. -- **updated_at** (String) The last time this user was updated. +- `contributor_of_organizations` (Set of Map of String) The list of organizations this user has contributed to. +- `created_at` (String) The time when the user was created. +- `deleted` (Boolean) Whether this user is deleted +- `enabled` (Boolean) Whether this user is enabled +- `id` (String) The unique id of this user generated by the anypoint platform. +- `idprovider_id` (String) The identity provider id +- `is_federated` (Boolean) Whether this user is federated. +- `last_login` (String) The last time this user logged in. +- `member_of_organizations` (Set of Map of String) The user's list of organizations membership +- `mfa_verification_excluded` (Boolean) Whether MFA verification is excluded for this user +- `mfa_verifiers_configured` (String) The MFA configured for this user. +- `organization` (Map of String) The organization information +- `organization_id` (String) The master organization id where the user is defined. +- `organization_preferences` (Map of String) The preferences of the user within the organization. +- `properties` (String) The user's properties. +- `type` (String) The type of user. +- `updated_at` (String) The last time this user was updated. diff --git a/docs/resources/user_rolegroup.md b/docs/resources/user_rolegroup.md index 955cfb8..46a5f35 100644 --- a/docs/resources/user_rolegroup.md +++ b/docs/resources/user_rolegroup.md @@ -25,25 +25,25 @@ resource "anypoint_user_rolegroup" "user_rolegroup" { ### Required -- **org_id** (String) The master organization id where the role-group is defined. -- **rolegroup_id** (String) The role-group id. -- **user_id** (String) The user id. +- `org_id` (String) The master organization id where the role-group is defined. +- `rolegroup_id` (String) The role-group id. +- `user_id` (String) The user id. ### Optional -- **last_updated** (String) The last time this resource has been updated locally. +- `last_updated` (String) The last time this resource has been updated locally. ### Read-Only -- **context_params** (Map of String) The role-group scope. -- **created_at** (String) The time when the user was assigned to the role-group. -- **description** (String) The description of the role-group -- **editable** (Boolean) Whether the role-group is editable -- **external_names** (List of String) List of external names of the role-group -- **id** (String) The unique id of this user-rolegroup resource composed by `org_id`_`user_id`_`rolegroup_id` -- **name** (String) The name of the role-group. -- **role_group_id** (String) The role-group id. -- **updated_at** (String) The time when the user assignment to the role-group was updated. -- **user_role_group_id** (String) The unique if of the user assignment to the role-group +- `context_params` (Map of String) The role-group scope. +- `created_at` (String) The time when the user was assigned to the role-group. +- `description` (String) The description of the role-group +- `editable` (Boolean) Whether the role-group is editable +- `external_names` (List of String) List of external names of the role-group +- `id` (String) The unique id of this user-rolegroup resource composed by `org_id`_`user_id`_`rolegroup_id` +- `name` (String) The name of the role-group. +- `role_group_id` (String) The role-group id. +- `updated_at` (String) The time when the user assignment to the role-group was updated. +- `user_role_group_id` (String) The unique if of the user assignment to the role-group diff --git a/docs/resources/vpc.md b/docs/resources/vpc.md index b3b7342..c92270c 100644 --- a/docs/resources/vpc.md +++ b/docs/resources/vpc.md @@ -52,36 +52,36 @@ resource "anypoint_vpc" "avpc" { ### Required -- **cidr_block** (String) The IP address range that the vpc will use. The largest is /16 and the smallest, /24 -- **name** (String) The name of the vpc. -- **org_id** (String) The organization id where the vpc is defined. -- **region** (String) The CloudHub region where this vpc will exist +- `cidr_block` (String) The IP address range that the vpc will use. The largest is /16 and the smallest, /24 +- `name` (String) The name of the vpc. +- `org_id` (String) The organization id where the vpc is defined. +- `region` (String) The CloudHub region where this vpc will exist ### Optional -- **associated_environments** (List of String) A list of CloudHub environments to associate to this vpc. -- **firewall_rules** (Block List) Inbound firewall rules for all CloudHub workers in this vpc. The list is allow only with an implicit deny all if no rules match (see [below for nested schema](#nestedblock--firewall_rules)) -- **internal_dns_servers** (List of String) List of internal dns servers -- **internal_dns_special_domains** (List of String) List of internal dns special domains -- **is_default** (Boolean) If set to true, the VPC will be associated to all CloudHub environments not explicitly associated to another vpc, including newly created ones -- **last_updated** (String) The last time this resource has been updated locally. -- **owner_id** (String) The id of the organization that owns the vpc. -- **shared_with** (List of String) A list of Business Groups to share this vpc with -- **vpc_routes** (Block List) The network routes of this vpc. (see [below for nested schema](#nestedblock--vpc_routes)) +- `associated_environments` (List of String) A list of CloudHub environments to associate to this vpc. +- `firewall_rules` (Block List) Inbound firewall rules for all CloudHub workers in this vpc. The list is allow only with an implicit deny all if no rules match (see [below for nested schema](#nestedblock--firewall_rules)) +- `internal_dns_servers` (List of String) List of internal dns servers +- `internal_dns_special_domains` (List of String) List of internal dns special domains +- `is_default` (Boolean) If set to true, the VPC will be associated to all CloudHub environments not explicitly associated to another vpc, including newly created ones +- `last_updated` (String) The last time this resource has been updated locally. +- `owner_id` (String) The id of the organization that owns the vpc. +- `shared_with` (List of String) A list of Business Groups to share this vpc with +- `vpc_routes` (Block List) The network routes of this vpc. (see [below for nested schema](#nestedblock--vpc_routes)) ### Read-Only -- **id** (String) The unique id of this vpc generated by the anypoint platform. +- `id` (String) The unique id of this vpc generated by the anypoint platform. ### Nested Schema for `firewall_rules` Required: -- **cidr_block** (String) -- **from_port** (Number) -- **protocol** (String) -- **to_port** (Number) +- `cidr_block` (String) +- `from_port` (Number) +- `protocol` (String) +- `to_port` (Number) @@ -89,7 +89,7 @@ Required: Required: -- **cidr** (String) -- **next_hop** (String) +- `cidr` (String) +- `next_hop` (String) diff --git a/docs/resources/vpn.md b/docs/resources/vpn.md index c4bc2ce..6f57c7f 100644 --- a/docs/resources/vpn.md +++ b/docs/resources/vpn.md @@ -40,39 +40,39 @@ resource "anypoint_vpn" "avpn" { ### Required -- **name** (String) The name of the vpn. -- **org_id** (String) The organization id where the vpn is defined. -- **remote_asn** (Number) The unique remote Autonomous System Number -- **remote_ip_address** (String) The remote ip address of the vpn server -- **tunnel_configs** (Block List, Min: 1) The configuration of the vpn tunnel (see [below for nested schema](#nestedblock--tunnel_configs)) -- **vpc_id** (String) The vpc id where the vpn is defined. +- `name` (String) The name of the vpn. +- `org_id` (String) The organization id where the vpn is defined. +- `remote_asn` (Number) The unique remote Autonomous System Number +- `remote_ip_address` (String) The remote ip address of the vpn server +- `tunnel_configs` (Block List, Min: 1) The configuration of the vpn tunnel (see [below for nested schema](#nestedblock--tunnel_configs)) +- `vpc_id` (String) The vpc id where the vpn is defined. ### Optional -- **local_asn** (Number) The local Autonomous System Number -- **remote_networks** (List of String) The list of remote addresses -- **vpn_tunnels** (Block List) List of vpn tunnels configurations (see [below for nested schema](#nestedblock--vpn_tunnels)) +- `local_asn` (Number) The local Autonomous System Number +- `remote_networks` (List of String) The list of remote addresses +- `vpn_tunnels` (Block List) List of vpn tunnels configurations (see [below for nested schema](#nestedblock--vpn_tunnels)) ### Read-Only -- **created_at** (String) The vpn creation time -- **failed_reason** (String) The error message if the vpn fails -- **id** (String) The unique id of this vpn generated by the anypoint platform. -- **update_available** (Boolean) Activated if an update is available -- **vpn_connection_status** (String) The status of the vpn connection +- `created_at` (String) The vpn creation time +- `failed_reason` (String) The error message if the vpn fails +- `id` (String) The unique id of this vpn generated by the anypoint platform. +- `update_available` (Boolean) Activated if an update is available +- `vpn_connection_status` (String) The status of the vpn connection ### Nested Schema for `tunnel_configs` Required: -- **psk** (String) The pre-shared key for authentication -- **ptp_cidr** (String) The peer to peer cidr block +- `psk` (String) The pre-shared key for authentication +- `ptp_cidr` (String) The peer to peer cidr block Optional: -- **rekey_fuzz** (Number) The percentage of the rekey window -- **rekey_margin_in_seconds** (Number) The margin time in seconds for rekey process +- `rekey_fuzz` (Number) The percentage of the rekey window +- `rekey_margin_in_seconds` (Number) The margin time in seconds for rekey process @@ -80,19 +80,19 @@ Optional: Required: -- **local_external_ip_address** (String) The tunnel ip address -- **local_ptp_ip_address** (String) The local peer to peer ip address -- **psk** (String) The pre-shared key -- **remote_ptp_ip_address** (String) The remote peer to peer ip address +- `local_external_ip_address` (String) The tunnel ip address +- `local_ptp_ip_address` (String) The local peer to peer ip address +- `psk` (String) The pre-shared key +- `remote_ptp_ip_address` (String) The remote peer to peer ip address Optional: -- **accepted_route_count** (Number) The number of acccepted routes +- `accepted_route_count` (Number) The number of acccepted routes Read-Only: -- **last_status_change** (String) The last status time the status has changed -- **status** (String) The status of this vpn tunnel -- **status_message** (String) The status message of this vpn tunnel +- `last_status_change` (String) The last status time the status has changed +- `status` (String) The status of this vpn tunnel +- `status_message` (String) The status message of this vpn tunnel diff --git a/examples/data-sources/anypoint_connected_app/data-source.tf b/examples/data-sources/anypoint_connected_app/data-source.tf new file mode 100644 index 0000000..6918cf4 --- /dev/null +++ b/examples/data-sources/anypoint_connected_app/data-source.tf @@ -0,0 +1,3 @@ +data "anypoint_connected_app" "my_read_conn_app" { + id = "7d72415f862044199be3b739848e6adb" # existing Connected App client id +} \ No newline at end of file diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 6c8f39b..2dfcdb1 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -7,6 +7,8 @@ provider "anypoint" { client_id = var.client_id # optionally use ANYPOINT_CLIENT_ID env var client_secret = var.client_secret # optionally use ANYPOINT_CLIENT_SECRET env var + access_token = var.access_token # optionally use ANYPOINT_ACCESS_TOKEN env var + # You may need to change the anypoint control plane: use 'eu' or 'us' # by default the control plane is 'us' cplane= var.cplane # optionnaly use ANYPOINT_CPLANE env var diff --git a/examples/provider/variables.tf b/examples/provider/variables.tf index 408522b..8756ed7 100644 --- a/examples/provider/variables.tf +++ b/examples/provider/variables.tf @@ -10,6 +10,9 @@ variable "client_id" { variable "client_secret" { } +variable "access_token" { +} + variable "cplane" { default = "us" } \ No newline at end of file diff --git a/examples/resources/anypoint_connected_app/resource.tf b/examples/resources/anypoint_connected_app/resource.tf new file mode 100644 index 0000000..bb3f3f4 --- /dev/null +++ b/examples/resources/anypoint_connected_app/resource.tf @@ -0,0 +1,58 @@ +resource "anypoint_connected_app" "my_conn_app_its_own_behalf" { + name = "its own behalf" + grant_types = ["client_credentials"] + audience = "internal" + + scope { + scope = "profile" + } + + scope { + scope = "aeh_admin" + org_id = var.org_id + } + + scope { + scope = "read:audit_logs" + org_id = var.org_id + } + + scope { + scope = "view:environment" + org_id = var.org_id + env_id = var.env_id + } + + scope { + scope = "edit:environment" + org_id = var.org_id + env_id = var.env_id + } +} + +resource "anypoint_connected_app" "my_conn_app_behalf_of_user" { + name = "behalf of user" + grant_types = [ + "authorization_code", + "refresh_token", + "password", + "urn:ietf:params:oauth:grant-type:jwt-bearer" + ] + + audience = "everyone" + client_uri = "https://mysite.com" + redirect_uris = [ + "https://myothersitei.com" + ] + public_keys = [ + "some_public_key" + ] + + scope { + scope = "full" + } + + scope { + scope = "read:full" + } +} \ No newline at end of file diff --git a/examples/resources/anypoint_connected_app/test.auto.tfvars b/examples/resources/anypoint_connected_app/test.auto.tfvars new file mode 100644 index 0000000..7e4ed7d --- /dev/null +++ b/examples/resources/anypoint_connected_app/test.auto.tfvars @@ -0,0 +1,2 @@ +org_id = "4ddb9686-45ac-4e35-81e0-8c83112480c0" # existing Organization/Business Group ID +env_id = "772286a8-bd54-4c71-a09d-0de1b7fee7d2" # existing Environment ID within above Organization/Business Group \ No newline at end of file diff --git a/examples/resources/anypoint_connected_app/test.tf b/examples/resources/anypoint_connected_app/test.tf new file mode 100644 index 0000000..17e264c --- /dev/null +++ b/examples/resources/anypoint_connected_app/test.tf @@ -0,0 +1,7 @@ +variable "org_id" { + default = "4ddb9686-45ac-4e35-81e0-8c83112480c0" # existing Organization/Business Group ID +} + +variable "env_id" { + default = "772286a8-bd54-4c71-a09d-0de1b7fee7d2" # existing Environment ID within above Organization/Business Group +} \ No newline at end of file diff --git a/go.mod b/go.mod index 5ae33f0..8bafd66 100644 --- a/go.mod +++ b/go.mod @@ -11,21 +11,22 @@ require ( github.com/iancoleman/strcase v0.2.0 github.com/mattn/go-colorable v0.1.12 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mulesoft-consulting/anypoint-client-go/authorization v0.2.0 - github.com/mulesoft-consulting/anypoint-client-go/dlb v0.3.0 - github.com/mulesoft-consulting/anypoint-client-go/env v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/idp v0.1.2 - github.com/mulesoft-consulting/anypoint-client-go/org v0.3.0 - github.com/mulesoft-consulting/anypoint-client-go/role v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/team v0.2.0 - github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/team_members v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/user v0.2.0 - github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.1.0 - github.com/mulesoft-consulting/anypoint-client-go/vpc v0.5.0 - github.com/mulesoft-consulting/anypoint-client-go/vpn v0.0.1 + github.com/mulesoft-consulting/anypoint-client-go/authorization v0.3.0 + github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.0.3 + github.com/mulesoft-consulting/anypoint-client-go/dlb v0.4.0 + github.com/mulesoft-consulting/anypoint-client-go/env v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/idp v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/org v0.4.0 + github.com/mulesoft-consulting/anypoint-client-go/role v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/team v0.3.0 + github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.2.1 + github.com/mulesoft-consulting/anypoint-client-go/team_members v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/user v0.3.0 + github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.2.0 + github.com/mulesoft-consulting/anypoint-client-go/vpc v0.6.0 + github.com/mulesoft-consulting/anypoint-client-go/vpn v0.1.0 github.com/oklog/run v1.1.0 // indirect golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect diff --git a/go.sum b/go.sum index 80eb469..23db8f2 100644 --- a/go.sum +++ b/go.sum @@ -251,34 +251,70 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mulesoft-consulting/anypoint-client-go/authorization v0.2.0 h1:cUTd2m8r7e3imt61i4vrIwg9tHdF+7bae2Vupo6SrLE= github.com/mulesoft-consulting/anypoint-client-go/authorization v0.2.0/go.mod h1:GyBcff4ALCgcHr85uzs+R0jzScwD2QIs8I7jZcM+o1M= +github.com/mulesoft-consulting/anypoint-client-go/authorization v0.3.0 h1:4OinjKxZwKnIGm6M4JMFG5V3qkV/64zySsNxSA6fhh8= +github.com/mulesoft-consulting/anypoint-client-go/authorization v0.3.0/go.mod h1:GyBcff4ALCgcHr85uzs+R0jzScwD2QIs8I7jZcM+o1M= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.0.1 h1:/qBx+jBDWj+y+9j2SOOoUVyhUVk1svWKbQs7MZxw5vw= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.0.1/go.mod h1:Xk9F9Nv2rw2fAzA39XfQ8VP3XkkWWmXR+nYQmt9MDKE= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.0.3 h1:Nd7hy64VRooU7fMSvPIVVV17UCY4eh+dPZFIamKVfFs= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.0.3/go.mod h1:Xk9F9Nv2rw2fAzA39XfQ8VP3XkkWWmXR+nYQmt9MDKE= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.1.0 h1:mNc7i26mvrUwzb1bZY6PzNIhP5zu7b0c/yylVxGKm3g= +github.com/mulesoft-consulting/anypoint-client-go/connected_app v0.1.0/go.mod h1:Xk9F9Nv2rw2fAzA39XfQ8VP3XkkWWmXR+nYQmt9MDKE= github.com/mulesoft-consulting/anypoint-client-go/dlb v0.3.0 h1:GvAXH2AT2uNNbvxfvx0V2D5HMJ18v2gHZ0J6icumOmc= github.com/mulesoft-consulting/anypoint-client-go/dlb v0.3.0/go.mod h1:ftj9Trt79sh7B5bcOiSGlFC/AtDXUabSj0pC7ktUtck= +github.com/mulesoft-consulting/anypoint-client-go/dlb v0.4.0 h1:92JnKgYGFeQ2nMUHyqPF/4DubyQ7Ym7snma1OonihXk= +github.com/mulesoft-consulting/anypoint-client-go/dlb v0.4.0/go.mod h1:ftj9Trt79sh7B5bcOiSGlFC/AtDXUabSj0pC7ktUtck= github.com/mulesoft-consulting/anypoint-client-go/env v0.1.0 h1:W3PbikRBYoDE9GM1gAZdHn/W0ImGyaUWZOIZ4ehhhJ0= github.com/mulesoft-consulting/anypoint-client-go/env v0.1.0/go.mod h1:IOpP0enauRkNvlZlACRPrqjmjUMB+mpUMXunUr58wzo= +github.com/mulesoft-consulting/anypoint-client-go/env v0.2.0 h1:Ij8MxZHa7mXfyUyXrOgPY2oyicUF0+F+wGvy8juVa6U= +github.com/mulesoft-consulting/anypoint-client-go/env v0.2.0/go.mod h1:IOpP0enauRkNvlZlACRPrqjmjUMB+mpUMXunUr58wzo= github.com/mulesoft-consulting/anypoint-client-go/idp v0.1.2 h1:UHTw39+JWekWc+0mO6BSupfECOdddQ9mlT72hY/lH2o= github.com/mulesoft-consulting/anypoint-client-go/idp v0.1.2/go.mod h1:J5AmL4bkfDFgYN1h4UWSKTlKPMZo8YDSDaZgXPBoGy0= +github.com/mulesoft-consulting/anypoint-client-go/idp v0.2.0 h1:RqU9FDzYAuBclNKs4prXhNYcE2k8KzO+yy/ab7PHJDs= +github.com/mulesoft-consulting/anypoint-client-go/idp v0.2.0/go.mod h1:J5AmL4bkfDFgYN1h4UWSKTlKPMZo8YDSDaZgXPBoGy0= github.com/mulesoft-consulting/anypoint-client-go/org v0.3.0 h1:uIVwClYi77y2qEFCkK053OCnpkp7XUq9auS1SJfXLjE= github.com/mulesoft-consulting/anypoint-client-go/org v0.3.0/go.mod h1:j5FY31MM+wC2EgKQWXXoQQHduo42O4r2ObbntquyBdk= +github.com/mulesoft-consulting/anypoint-client-go/org v0.4.0 h1:x7LC2eBOFQMWPRDvF/ljAFZG50k1s93WWb48ikXwkyc= +github.com/mulesoft-consulting/anypoint-client-go/org v0.4.0/go.mod h1:j5FY31MM+wC2EgKQWXXoQQHduo42O4r2ObbntquyBdk= github.com/mulesoft-consulting/anypoint-client-go/role v0.1.0 h1:caGOx/XqO1Mtf2ZSA8gJv10eTkMGEUrq2H24//mUUJo= github.com/mulesoft-consulting/anypoint-client-go/role v0.1.0/go.mod h1:OTkv1u8cqvo3Eyv2sJ+rw5Hm++9NFkv8SyJolnoUycM= +github.com/mulesoft-consulting/anypoint-client-go/role v0.2.0 h1:VmDFep1gVPYownxpPr0O97osR4Cwy9E2fkll8hKaJBE= +github.com/mulesoft-consulting/anypoint-client-go/role v0.2.0/go.mod h1:OTkv1u8cqvo3Eyv2sJ+rw5Hm++9NFkv8SyJolnoUycM= github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.1.0 h1:j8uEjvJhopBNFJMnmeG1uT0HCBAisRua3ZEUHIpddU8= github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.1.0/go.mod h1:/sGq56MFhauQu4lIj2zLMXAVLy1E8yhDtaLBf1SM6k0= +github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.2.0 h1:ivygHQqLOclXdlLUmIppLZW7BBw2cHgjSzRvFMgctpc= +github.com/mulesoft-consulting/anypoint-client-go/rolegroup v0.2.0/go.mod h1:/sGq56MFhauQu4lIj2zLMXAVLy1E8yhDtaLBf1SM6k0= github.com/mulesoft-consulting/anypoint-client-go/team v0.2.0 h1:B/E/axv/d+/qm2dGKxZqpTZL22qQ+pZtnpafRfKoAVA= github.com/mulesoft-consulting/anypoint-client-go/team v0.2.0/go.mod h1:NsJA09zxrpvxbGQ0GHjDq9Vj1u+2Y+/GrLZcEtBgD6Y= +github.com/mulesoft-consulting/anypoint-client-go/team v0.3.0 h1:+2WETgWXN1HGaz5TgzEsfW5nTZbIDlEUGtauXlgfTtM= +github.com/mulesoft-consulting/anypoint-client-go/team v0.3.0/go.mod h1:NsJA09zxrpvxbGQ0GHjDq9Vj1u+2Y+/GrLZcEtBgD6Y= github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.1.0 h1:fyCem36ID/gU9lxjQ80EePgoFRqaNibC8+AKIZvK0WQ= github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.1.0/go.mod h1:QO+k/uqB+12rfX1nM6EPBKfKcpJpF5IR2Pe55J3MRXU= +github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.2.1 h1:SrmwDAtGRpKHHwAPQJX5xrdQYSwDQsx7aURkyNLjL9s= +github.com/mulesoft-consulting/anypoint-client-go/team_group_mappings v0.2.1/go.mod h1:QO+k/uqB+12rfX1nM6EPBKfKcpJpF5IR2Pe55J3MRXU= github.com/mulesoft-consulting/anypoint-client-go/team_members v0.1.0 h1:m6pjl7nN6W5nxb9Bec7STf9NWhkS3zV51l3d59MAAHE= github.com/mulesoft-consulting/anypoint-client-go/team_members v0.1.0/go.mod h1:xnVvjfnNsQNM+B64kQ77JqTBrWXpwrAp0xZIRc/XJ3k= +github.com/mulesoft-consulting/anypoint-client-go/team_members v0.2.0 h1:yjb+mv+UnwkkQdAsLE0XKaXticoE4b+YTITHrsslSdE= +github.com/mulesoft-consulting/anypoint-client-go/team_members v0.2.0/go.mod h1:xnVvjfnNsQNM+B64kQ77JqTBrWXpwrAp0xZIRc/XJ3k= github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.1.0 h1:+e5ordWiHX75p1Ziroo+0tF5YGaNEiW6igy3Tq0Sg8o= github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.1.0/go.mod h1:2MRhJfJYLxm392cgvoGyteaVAwN9hgmGciP6qSLAirU= +github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.2.0 h1:TS/DxULuTuzklovS7H+hxqIImoLvqJENplyh2gP8md0= +github.com/mulesoft-consulting/anypoint-client-go/team_roles v0.2.0/go.mod h1:2MRhJfJYLxm392cgvoGyteaVAwN9hgmGciP6qSLAirU= github.com/mulesoft-consulting/anypoint-client-go/user v0.2.0 h1:u/m6agWelZSqMWPdj+xJsXL6mL7rtL3XSZq5oGLjjOA= github.com/mulesoft-consulting/anypoint-client-go/user v0.2.0/go.mod h1:jtvhqDTmUHe4/UhKCl/3Wzu1hYDhBZ/28eKyv7X0ALE= +github.com/mulesoft-consulting/anypoint-client-go/user v0.3.0 h1:l/TDFwaAD7lyzTvSg4ueTktBe1JPgm7BhwDa9EDiRvs= +github.com/mulesoft-consulting/anypoint-client-go/user v0.3.0/go.mod h1:jtvhqDTmUHe4/UhKCl/3Wzu1hYDhBZ/28eKyv7X0ALE= github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.1.0 h1:JiozVgIUoqPASDvkxdscXZjWIK2p2IQAICX5mVFS86g= github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.1.0/go.mod h1:qXNmXxK8pMuvMV6qTNVYkizIGJg+P5aNujDAIRHAXBQ= +github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.2.0 h1:HzORsWIHYaNOCcZf0ekaVNA78pCR79XXSbZRMsIYayU= +github.com/mulesoft-consulting/anypoint-client-go/user_rolegroups v0.2.0/go.mod h1:qXNmXxK8pMuvMV6qTNVYkizIGJg+P5aNujDAIRHAXBQ= github.com/mulesoft-consulting/anypoint-client-go/vpc v0.5.0 h1:m+tX4v+4djQ5cGtK+X7z0NdftBbqnJ65Jl9HzcP5znw= github.com/mulesoft-consulting/anypoint-client-go/vpc v0.5.0/go.mod h1:3m2UBrwPsugX27/2BeKRSd3z0UG8N1ZO1qOw63Bg87I= +github.com/mulesoft-consulting/anypoint-client-go/vpc v0.6.0 h1:84vkyOK/KqpBDO3gLmFl5M0piCOx5IMKR9ehf2dF+aA= +github.com/mulesoft-consulting/anypoint-client-go/vpc v0.6.0/go.mod h1:3m2UBrwPsugX27/2BeKRSd3z0UG8N1ZO1qOw63Bg87I= github.com/mulesoft-consulting/anypoint-client-go/vpn v0.0.1 h1:nBbTxdbv9PhpSUvoafcX5scyFk2+xFmAkwL/0PEVQvw= github.com/mulesoft-consulting/anypoint-client-go/vpn v0.0.1/go.mod h1:hBds6JG3ZxMtVLuLBvW1itYqAxGlRPUPSwXdsyutKmw= +github.com/mulesoft-consulting/anypoint-client-go/vpn v0.1.0 h1:nSkIejdvqjUs3SG61EwLcnHJMH5aIrnP6+00cRbUGS4= +github.com/mulesoft-consulting/anypoint-client-go/vpn v0.1.0/go.mod h1:hBds6JG3ZxMtVLuLBvW1itYqAxGlRPUPSwXdsyutKmw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs= diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index aedf309..46d9bb1 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -17,7 +17,7 @@ This project is not an official Mulesoft product, it is an open-source initiativ Any contribution is welcome. If you're interested in this project, please get in touch 📧. -Join our Discord [server](https://discord.gg/ApZBgfeY) !! +Join our Discord [server](https://discord.gg/YrFr5CRW) !! ## Example Usage