Skip to content

Commit

Permalink
Add "v1" prefix to deploydatabaseservices endpoint (#43830)
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinFrazar authored Jul 8, 2024
1 parent a06f68d commit 127190e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions web/packages/teleport/src/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test('getDeployServiceIamConfigureScriptPath formatting', async () => {
taskRoleArn: 'task-arn',
};
const base =
'http://localhost/webapi/scripts/integrations/configure/deployservice-iam.sh?';
'http://localhost/v1/webapi/scripts/integrations/configure/deployservice-iam.sh?';
const expected = `integrationName=${'int-name'}&awsRegion=${'us-east-1'}&role=${'oidc-arn'}&taskRole=${'task-arn'}`;
expect(cfg.getDeployServiceIamConfigureScriptUrl(params)).toBe(
`${base}${expected}`
Expand All @@ -45,7 +45,7 @@ test('getAwsOidcConfigureIdpScriptUrl formatting with s3 fields', async () => {
s3Prefix: 's3-prefix',
};
const base =
'http://localhost/webapi/scripts/integrations/configure/awsoidc-idp.sh?';
'http://localhost/v1/webapi/scripts/integrations/configure/awsoidc-idp.sh?';
const expected = `integrationName=int-name&role=role-arn&s3Bucket=s3-bucket&s3Prefix=s3-prefix`;
expect(cfg.getAwsOidcConfigureIdpScriptUrl(params)).toBe(
`${base}${expected}`
Expand All @@ -58,7 +58,7 @@ test('getAwsOidcConfigureIdpScriptUrl formatting, without s3 fields', async () =
roleName: 'role-arn',
};
const base =
'http://localhost/webapi/scripts/integrations/configure/awsoidc-idp.sh?';
'http://localhost/v1/webapi/scripts/integrations/configure/awsoidc-idp.sh?';
const expected = `integrationName=int-name&role=role-arn`;
expect(cfg.getAwsOidcConfigureIdpScriptUrl(params)).toBe(
`${base}${expected}`
Expand Down
8 changes: 4 additions & 4 deletions web/packages/teleport/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,18 @@ const cfg = {
thumbprintPath: '/v1/webapi/thumbprint',

awsConfigureIamScriptOidcIdpPath:
'/webapi/scripts/integrations/configure/awsoidc-idp.sh?integrationName=:integrationName&role=:roleName',
'/v1/webapi/scripts/integrations/configure/awsoidc-idp.sh?integrationName=:integrationName&role=:roleName',
awsConfigureIamScriptDeployServicePath:
'/webapi/scripts/integrations/configure/deployservice-iam.sh?integrationName=:integrationName&awsRegion=:region&role=:awsOidcRoleArn&taskRole=:taskRoleArn',
'/v1/webapi/scripts/integrations/configure/deployservice-iam.sh?integrationName=:integrationName&awsRegion=:region&role=:awsOidcRoleArn&taskRole=:taskRoleArn',
awsConfigureIamScriptListDatabasesPath:
'/webapi/scripts/integrations/configure/listdatabases-iam.sh?awsRegion=:region&role=:iamRoleName',
'/v1/webapi/scripts/integrations/configure/listdatabases-iam.sh?awsRegion=:region&role=:iamRoleName',
awsConfigureIamScriptEc2InstanceConnectPath:
'/v1/webapi/scripts/integrations/configure/eice-iam.sh?awsRegion=:region&role=:iamRoleName',
awsConfigureIamEksScriptPath:
'/v1/webapi/scripts/integrations/configure/eks-iam.sh?awsRegion=:region&role=:iamRoleName',

awsRdsDbDeployServicesPath:
'/webapi/sites/:clusterId/integrations/aws-oidc/:name/deploydatabaseservices',
'/v1/webapi/sites/:clusterId/integrations/aws-oidc/:name/deploydatabaseservices',
awsRdsDbRequiredVpcsPath:
'/v1/webapi/sites/:clusterId/integrations/aws-oidc/:name/requireddatabasesvpcs',
awsRdsDbListPath:
Expand Down

0 comments on commit 127190e

Please sign in to comment.