fix: fix build pipeline error #38
10 changed files with 64 additions and 62 deletions
|
|
@ -678,7 +678,12 @@ func handleTfTagForDatasourceFile(filePath, service, resource string) error {
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
tmp, err := os.CreateTemp("", "replace-*")
|
||||
root, err := getRoot()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
tmp, err := os.CreateTemp(*root, "replace-*")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackitprivatepreview_postgresflexalpha_database Data Source - stackitprivatepreview"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Postgres Flex database resource schema. Must have a region specified in the provider configuration.
|
||||
|
||||
---
|
||||
|
||||
# stackitprivatepreview_postgresflexalpha_database (Data Source)
|
||||
|
||||
Postgres Flex database resource schema. Must have a `region` specified in the provider configuration.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
|
@ -25,16 +25,14 @@ data "stackitprivatepreview_postgresflexalpha_database" "example" {
|
|||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the Postgres Flex instance.
|
||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||
|
||||
### Optional
|
||||
|
||||
- `database_id` (Number) Database ID.
|
||||
- `name` (String) Database name.
|
||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||
- `database_id` (Number) The ID of the database.
|
||||
- `instance_id` (String) The ID of the instance.
|
||||
- `project_id` (String) The STACKIT project ID.
|
||||
- `region` (String) The region which should be addressed
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`database_id`".
|
||||
- `owner` (String) Username of the database owner.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`,`database_id`\".",
|
||||
- `name` (String) The name of the database.
|
||||
- `owner` (String) The owner of the database.
|
||||
- `tf_original_api_id` (Number) The id of the database.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackitprivatepreview_postgresflexalpha_user Data Source - stackitprivatepreview"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Postgres Flex user data source schema. Must have a region specified in the provider configuration.
|
||||
|
||||
---
|
||||
|
||||
# stackitprivatepreview_postgresflexalpha_user (Data Source)
|
||||
|
||||
Postgres Flex user data source schema. Must have a `region` specified in the provider configuration.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
|
@ -25,20 +25,18 @@ data "stackitprivatepreview_postgresflexalpha_user" "example" {
|
|||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the PostgresFlex instance.
|
||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||
- `user_id` (String) User ID.
|
||||
- `instance_id` (String) The ID of the instance.
|
||||
- `project_id` (String) The STACKIT project ID.
|
||||
- `region` (String) The region which should be addressed
|
||||
- `user_id` (Number) The ID of the user.
|
||||
|
||||
### Optional
|
||||
|
||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`,`user_id`\".",
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `connection_string` (String) The connection string for the user to the instance.
|
||||
- `host` (String) The host address for the user to connect to the instance.
|
||||
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
||||
- `port` (Number) The port number for the user to connect to the instance.
|
||||
- `roles` (Set of String) The roles assigned to the user.
|
||||
- `name` (String) The name of the user.
|
||||
- `roles` (List of String) A list of user roles.
|
||||
- `status` (String) The current status of the user.
|
||||
- `username` (String) The name of the user.
|
||||
- `tf_original_api_id` (Number) The ID of the user.
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ description: |-
|
|||
|
||||
- `collation_name` (String) The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||
- `compatibility_level` (Number) CompatibilityLevel of the Database.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`,`database_id`\".",
|
||||
- `name` (String) The name of the database.
|
||||
- `owner` (String) The owner of the database.
|
||||
- `tf_original_api_id` (Number) The id of the database.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ data "stackitprivatepreview_sqlserverflexalpha_instance" "example" {
|
|||
- `edition` (String) Edition of the MSSQL server instance
|
||||
- `encryption` (Attributes) this defines which key to use for storage encryption (see [below for nested schema](#nestedatt--encryption))
|
||||
- `flavor_id` (String) The id of the instance flavor.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`\".
|
||||
- `is_deletable` (Boolean) Whether the instance can be deleted or not.
|
||||
- `name` (String) The name of the instance.
|
||||
- `network` (Attributes) The access configuration of the instance (see [below for nested schema](#nestedatt--network))
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackitprivatepreview_postgresflexalpha_database Resource - stackitprivatepreview"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Postgres Flex database resource schema. Must have a region specified in the provider configuration.
|
||||
|
||||
---
|
||||
|
||||
# stackitprivatepreview_postgresflexalpha_database (Resource)
|
||||
|
||||
Postgres Flex database resource schema. Must have a `region` specified in the provider configuration.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
|
@ -32,16 +32,16 @@ import {
|
|||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the Postgres Flex instance.
|
||||
- `name` (String) Database name.
|
||||
- `owner` (String) Username of the database owner.
|
||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||
- `name` (String) The name of the database.
|
||||
|
||||
### Optional
|
||||
|
||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||
- `database_id` (Number) The ID of the database.
|
||||
- `instance_id` (String) The ID of the instance.
|
||||
- `owner` (String) The owner of the database.
|
||||
- `project_id` (String) The STACKIT project ID.
|
||||
- `region` (String) The region which should be addressed
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `database_id` (Number) Database ID.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`database_id`".
|
||||
- `id` (Number) The id of the database.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackitprivatepreview_postgresflexalpha_user Resource - stackitprivatepreview"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Postgres Flex user resource schema. Must have a region specified in the provider configuration.
|
||||
|
||||
---
|
||||
|
||||
# stackitprivatepreview_postgresflexalpha_user (Resource)
|
||||
|
||||
Postgres Flex user resource schema. Must have a `region` specified in the provider configuration.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
|
@ -32,21 +32,19 @@ import {
|
|||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the PostgresFlex instance.
|
||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||
- `roles` (Set of String) Database access levels for the user. Possible values are: `login`, `createdb`, `createrole`.
|
||||
- `username` (String) The name of the user.
|
||||
- `name` (String) The name of the user.
|
||||
|
||||
### Optional
|
||||
|
||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||
- `instance_id` (String) The ID of the instance.
|
||||
- `project_id` (String) The STACKIT project ID.
|
||||
- `region` (String) The region which should be addressed
|
||||
- `roles` (List of String) A list containing the user roles for the instance.
|
||||
- `user_id` (Number) The ID of the user.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `connection_string` (String) The connection string for the user to the instance.
|
||||
- `host` (String) The host of the Postgres Flex instance.
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
||||
- `password` (String, Sensitive) The password for the user. This is only set upon creation.
|
||||
- `port` (Number) The port of the Postgres Flex instance.
|
||||
- `id` (Number) The ID of the user.
|
||||
- `password` (String) The password for the user.
|
||||
- `status` (String) The current status of the user.
|
||||
- `user_id` (Number) User ID.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackitprivatepreview_sqlserverflexalpha_user Resource - stackitprivatepreview"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
SQLServer Flex user resource schema. Must have a region specified in the provider configuration.
|
||||
|
||||
---
|
||||
|
||||
# stackitprivatepreview_sqlserverflexalpha_user (Resource)
|
||||
|
||||
SQLServer Flex user resource schema. Must have a `region` specified in the provider configuration.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
|
@ -32,21 +32,22 @@ import {
|
|||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the SQLServer Flex instance.
|
||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||
- `roles` (Set of String) Database access levels for the user. The values for the default roles are: `##STACKIT_DatabaseManager##`, `##STACKIT_LoginManager##`, `##STACKIT_ProcessManager##`, `##STACKIT_ServerManager##`, `##STACKIT_SQLAgentManager##`, `##STACKIT_SQLAgentUser##`
|
||||
- `username` (String) Username of the SQLServer Flex instance.
|
||||
- `roles` (List of String) A list containing the user roles for the instance.
|
||||
- `username` (String) The name of the user.
|
||||
|
||||
### Optional
|
||||
|
||||
- `region` (String)
|
||||
- `default_database` (String) The default database for a user of the instance.
|
||||
- `instance_id` (String) The ID of the instance.
|
||||
- `project_id` (String) The STACKIT project ID.
|
||||
- `region` (String) The region which should be addressed
|
||||
- `user_id` (Number) The ID of the user.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `default_database` (String)
|
||||
- `host` (String)
|
||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
||||
- `password` (String, Sensitive) Password of the user account.
|
||||
- `port` (Number)
|
||||
- `status` (String)
|
||||
- `user_id` (Number) User ID.
|
||||
- `host` (String) The host of the instance in which the user belongs to.
|
||||
- `id` (Number) The ID of the user.
|
||||
- `password` (String) The password for the user.
|
||||
- `port` (Number) The port of the instance in which the user belongs to.
|
||||
- `status` (String) The current status of the user.
|
||||
- `uri` (String) The connection string for the user to the instance.
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func getDatabase(
|
|||
|
||||
for page := int32(1); ; page++ {
|
||||
res, err := client.ListDatabasesRequest(ctx, projectId, region, instanceId).
|
||||
Page(page).Size(pageSize).Sort(postgresflex.DATABASESORT_INDEX_ASC).Execute()
|
||||
Page(page).Size(pageSize).Sort(postgresflex.DATABASESORT_DATABASE_ID_ASC).Execute()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("requesting database list (page %d): %w", page, err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ func getFlavorsByFilter(
|
|||
|
||||
for page := int32(1); ; page++ {
|
||||
res, err := client.GetFlavorsRequest(ctx, projectId, region).
|
||||
Page(page).Size(pageSize).Sort(postgresflex.FLAVORSORT_INDEX_ASC).Execute()
|
||||
Page(page).Size(pageSize).Sort(postgresflex.FLAVORSORT_ID_ASC).Execute()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("requesting flavors list (page %d): %w", page, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue