@jaypie/constructs 1.1.50 → 1.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,13 @@
1
1
  import { Role } from "aws-cdk-lib/aws-iam";
2
2
  import { Construct } from "constructs";
3
3
  export interface JaypieGitHubDeployRoleProps {
4
- accountId: string;
5
4
  oidcProviderArn?: string;
6
5
  output?: boolean | string;
7
6
  repoRestriction?: string;
8
7
  }
9
8
  export declare class JaypieGitHubDeployRole extends Construct {
10
9
  private readonly _role;
11
- constructor(scope: Construct, id: string, props: JaypieGitHubDeployRoleProps);
10
+ constructor(scope: Construct, id: string, props?: JaypieGitHubDeployRoleProps);
12
11
  get role(): Role;
13
12
  get roleArn(): string;
14
13
  get roleName(): string;
@@ -14,7 +14,8 @@ export interface AccountAssignments {
14
14
  export interface JaypieSsoPermissionsProps {
15
15
  /**
16
16
  * ARN of the IAM Identity Center instance
17
- * If not provided, SSO setup will be skipped
17
+ * If not provided, falls back to CDK_ENV_IAM_IDENTITY_CENTER_ARN
18
+ * If neither is set, SSO setup will be skipped
18
19
  */
19
20
  iamIdentityCenterArn?: string;
20
21
  /**
package/dist/esm/index.js CHANGED
@@ -1321,9 +1321,11 @@ class JaypieDnsRecord extends Construct {
1321
1321
  }
1322
1322
 
1323
1323
  class JaypieGitHubDeployRole extends Construct {
1324
- constructor(scope, id, props) {
1324
+ constructor(scope, id, props = {}) {
1325
1325
  super(scope, id);
1326
- const { accountId, oidcProviderArn = Fn.importValue(CDK$2.IMPORT.OIDC_PROVIDER), output = true, repoRestriction: propsRepoRestriction, } = props;
1326
+ const { oidcProviderArn = Fn.importValue(CDK$2.IMPORT.OIDC_PROVIDER), output = true, repoRestriction: propsRepoRestriction, } = props;
1327
+ // Extract account ID from the scope
1328
+ const accountId = Stack.of(this).account;
1327
1329
  // Resolve repoRestriction from props or environment variables
1328
1330
  let repoRestriction = propsRepoRestriction;
1329
1331
  if (!repoRestriction) {
@@ -1548,7 +1550,8 @@ class JaypieOpenAiSecret extends JaypieEnvSecret {
1548
1550
  class JaypieSsoPermissions extends Construct {
1549
1551
  constructor(scope, id, props) {
1550
1552
  super(scope, id);
1551
- const { iamIdentityCenterArn, administratorGroupId, analystGroupId, developerGroupId, administratorAccountAssignments, analystAccountAssignments, developerAccountAssignments, } = props;
1553
+ const { iamIdentityCenterArn: iamIdentityCenterArnProp, administratorGroupId, analystGroupId, developerGroupId, administratorAccountAssignments, analystAccountAssignments, developerAccountAssignments, } = props;
1554
+ const iamIdentityCenterArn = iamIdentityCenterArnProp || process.env.CDK_ENV_IAM_IDENTITY_CENTER_ARN;
1552
1555
  if (!iamIdentityCenterArn) {
1553
1556
  // If no IAM Identity Center ARN provided, skip SSO setup
1554
1557
  return;
@@ -1800,7 +1803,7 @@ const DEFAULT_GOOGLE_GROUP_MATCH = "name:AWS*";
1800
1803
  // Class
1801
1804
  //
1802
1805
  class JaypieSsoSyncApplication extends Construct {
1803
- constructor(scope, id = "SSOSyncApplication", props = {}) {
1806
+ constructor(scope, id = "SsoSyncApplication", props = {}) {
1804
1807
  super(scope, id);
1805
1808
  const { googleAdminEmail, googleAdminEmailEnvKey = "CDK_ENV_SSOSYNC_GOOGLE_ADMIN_EMAIL", googleCredentials, googleCredentialsEnvKey = "CDK_ENV_SSOSYNC_GOOGLE_CREDENTIALS", googleGroupMatch, googleGroupMatchEnvKey = "CDK_ENV_SSOSYNC_GOOGLE_GROUP_MATCH", identityStoreId, identityStoreIdEnvKey = "CDK_ENV_SSOSYNC_IDENTITY_STORE_ID", scimEndpointAccessToken, scimEndpointAccessTokenEnvKey = "CDK_ENV_SCIM_ENDPOINT_ACCESS_TOKEN", scimEndpointUrl, scimEndpointUrlEnvKey = "CDK_ENV_SSOSYNC_SCIM_ENDPOINT_URL", semanticVersion, semanticVersionEnvKey = "CDK_ENV_SSOSYNC_SEMANTIC_VERSION", ssoSyncApplicationId = DEFAULT_APPLICATION_ID, tags, } = props;
1806
1809
  // Resolve all values from props or environment variables