@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
  /**
@@ -1352,9 +1352,11 @@ class JaypieDnsRecord extends constructs.Construct {
1352
1352
  }
1353
1353
 
1354
1354
  class JaypieGitHubDeployRole extends constructs.Construct {
1355
- constructor(scope, id, props) {
1355
+ constructor(scope, id, props = {}) {
1356
1356
  super(scope, id);
1357
- const { accountId, oidcProviderArn = cdk$1.Fn.importValue(cdk.CDK.IMPORT.OIDC_PROVIDER), output = true, repoRestriction: propsRepoRestriction, } = props;
1357
+ const { oidcProviderArn = cdk$1.Fn.importValue(cdk.CDK.IMPORT.OIDC_PROVIDER), output = true, repoRestriction: propsRepoRestriction, } = props;
1358
+ // Extract account ID from the scope
1359
+ const accountId = cdk$1.Stack.of(this).account;
1358
1360
  // Resolve repoRestriction from props or environment variables
1359
1361
  let repoRestriction = propsRepoRestriction;
1360
1362
  if (!repoRestriction) {
@@ -1579,7 +1581,8 @@ class JaypieOpenAiSecret extends JaypieEnvSecret {
1579
1581
  class JaypieSsoPermissions extends constructs.Construct {
1580
1582
  constructor(scope, id, props) {
1581
1583
  super(scope, id);
1582
- const { iamIdentityCenterArn, administratorGroupId, analystGroupId, developerGroupId, administratorAccountAssignments, analystAccountAssignments, developerAccountAssignments, } = props;
1584
+ const { iamIdentityCenterArn: iamIdentityCenterArnProp, administratorGroupId, analystGroupId, developerGroupId, administratorAccountAssignments, analystAccountAssignments, developerAccountAssignments, } = props;
1585
+ const iamIdentityCenterArn = iamIdentityCenterArnProp || process.env.CDK_ENV_IAM_IDENTITY_CENTER_ARN;
1583
1586
  if (!iamIdentityCenterArn) {
1584
1587
  // If no IAM Identity Center ARN provided, skip SSO setup
1585
1588
  return;
@@ -1831,7 +1834,7 @@ const DEFAULT_GOOGLE_GROUP_MATCH = "name:AWS*";
1831
1834
  // Class
1832
1835
  //
1833
1836
  class JaypieSsoSyncApplication extends constructs.Construct {
1834
- constructor(scope, id = "SSOSyncApplication", props = {}) {
1837
+ constructor(scope, id = "SsoSyncApplication", props = {}) {
1835
1838
  super(scope, id);
1836
1839
  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;
1837
1840
  // Resolve all values from props or environment variables