Skip to content

Commit

Permalink
11.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SupportSDM committed Oct 10, 2024
1 parent 29048f2 commit bc447c2
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 42 deletions.
12 changes: 12 additions & 0 deletions docs/resources/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ resource "sdm_resource" "postgres-test" {
}
}
}
resource "sdm_resource" "aurora-mysql-test" {
aurora_mysql {
name = "aurora-mysql-test"
hostname = "example.com"
database = "my-db"
port = 3306
secret_store_id = "se-109564346"
username = "path/to/credential?key=optionalKeyName"
password = "path/to/credential?key=optionalKeyName"
}
}
```
This resource can be imported using the [import](https://www.terraform.io/docs/cli/commands/import.html) command.
## Providing Credentials
Expand Down
10 changes: 5 additions & 5 deletions sdm/data_source_approval_workflow_step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ func TestAccSDMApprovalWorkflowStep_Get(t *testing.T) {
if err != nil {
t.Fatal("failed to create approval workflow step: ", err)
}
flowId := step.ApprovalFlowID
flowID := step.ApprovalFlowID

dsName := randomWithPrefix("af-test-query")
resource.Test(t, resource.TestCase{
Providers: testAccProviders,
CheckDestroy: testCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccSDMApprovalWorkflowStepDataSourceGetFilterConfig(dsName, flowId),
Config: testAccSDMApprovalWorkflowStepDataSourceGetFilterConfig(dsName, flowID),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("data.sdm_approval_workflow_step."+dsName, "approval_workflow_steps.0.approval_flow_id", flowId),
resource.TestCheckResourceAttr("data.sdm_approval_workflow_step."+dsName, "approval_workflow_steps.0.approval_flow_id", flowID),
resource.TestCheckResourceAttr("data.sdm_approval_workflow_step."+dsName, "approval_workflow_steps.#", "1"),
),
},
Expand Down Expand Up @@ -56,9 +56,9 @@ func TestAccSDMApprovalWorkflowStep_GetNone(t *testing.T) {
})
}

func testAccSDMApprovalWorkflowStepDataSourceGetFilterConfig(stepSourceName, flowId string) string {
func testAccSDMApprovalWorkflowStepDataSourceGetFilterConfig(stepSourceName, flowID string) string {
return fmt.Sprintf(`
data "sdm_approval_workflow_step" "%s" {
approval_flow_id = "%s"
}`, stepSourceName, flowId)
}`, stepSourceName, flowID)
}
2 changes: 1 addition & 1 deletion sdm/internal/sdk/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions sdm/internal/sdk/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions sdm/internal/sdk/plumbing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 53 additions & 27 deletions sdm/internal/sdk/v1/queries.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdm/provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdm/resource_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func testAccSDMAccountUserConfig(resourceName, firstName, lastName, email string
`, resourceName, firstName, lastName, email)
}

func testAccSDMAccountUserPermissionLevelConfig(resourceName, firstName, lastName, email, permission_level string) string {
func testAccSDMAccountUserPermissionLevelConfig(resourceName, firstName, lastName, email, permissionLevel string) string {

return fmt.Sprintf(`
resource "sdm_account" "%s" {
Expand All @@ -350,7 +350,7 @@ func testAccSDMAccountUserPermissionLevelConfig(resourceName, firstName, lastNam
permission_level = "%s"
}
}
`, resourceName, firstName, lastName, email, permission_level)
`, resourceName, firstName, lastName, email, permissionLevel)
}

func testAccSDMAccountServiceConfig(resourceName, serviceName string) string {
Expand Down
6 changes: 3 additions & 3 deletions sdm/resource_approval_workflow_approver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func createApprovalWorkflowApproversWithPrifix(prefix string, count int) ([]*sdm
}
step := createResp.ApprovalWorkflowStep

approval_workflow_approvers := []*sdm.ApprovalWorkflowApprover{}
approvalWorkflowApprovers := []*sdm.ApprovalWorkflowApprover{}
for i := 0; i < count; i++ {
createResp, err := client.ApprovalWorkflowApprovers().Create(ctx, &sdm.ApprovalWorkflowApprover{
ApprovalFlowID: workflows[0].ID,
Expand All @@ -242,9 +242,9 @@ func createApprovalWorkflowApproversWithPrifix(prefix string, count int) ([]*sdm
if err != nil {
return nil, fmt.Errorf("failed to create approval workflow approver: %w", err)
}
approval_workflow_approvers = append(approval_workflow_approvers, createResp.ApprovalWorkflowApprover)
approvalWorkflowApprovers = append(approvalWorkflowApprovers, createResp.ApprovalWorkflowApprover)
}
return approval_workflow_approvers, nil
return approvalWorkflowApprovers, nil
}

func testAccSDMApprovalWorkflowApproverConfig(workflowResourceName, workflowName, stepResourceName, accountName, roleName, approver1Name, approver2Name string) string {
Expand Down
6 changes: 3 additions & 3 deletions sdm/resource_approval_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func createApprovalWorkflowsWithPrifix(prefix, approvalMode string, count int) (
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
approval_workflows := []*sdm.ApprovalWorkflow{}
approvalWorkflows := []*sdm.ApprovalWorkflow{}
for i := 0; i < count; i++ {
createResp, err := client.ApprovalWorkflows().Create(ctx, &sdm.ApprovalWorkflow{
Name: randomWithPrefix(prefix),
Expand All @@ -118,9 +118,9 @@ func createApprovalWorkflowsWithPrifix(prefix, approvalMode string, count int) (
if err != nil {
return nil, fmt.Errorf("failed to create approval_workflow: %w", err)
}
approval_workflows = append(approval_workflows, createResp.ApprovalWorkflow)
approvalWorkflows = append(approvalWorkflows, createResp.ApprovalWorkflow)
}
return approval_workflows, nil
return approvalWorkflows, nil
}

func testAccSDMApprovalWorkflowConfig(resourceName, workflowName string) string {
Expand Down

0 comments on commit bc447c2

Please sign in to comment.