Skip to content

Commit

Permalink
chore: Update dns delegation role
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenKirschbaum committed Mar 9, 2024
1 parent d8320ea commit 8b4f80d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/SharePipelineStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export default class SharePipelineStack extends Stack {
pipeline.addStage(new ShareStage(this, 'Staging', {
domain: 'share-staging.kirschbaum.cloud',
delegation: {
parentDomain: 'kirschbaum.cloud',
accountId: '212836051001',
roleName: 'CloudshareDNSDelegationRole',
parentZoneId: 'Z0202936UCVSS5ELQXV6',
accountId: '058264224454',
roleName: 'CloudshareStagingDnsDelegationRole',
},
keycloak: {
url: 'https://id.elite12.de',
Expand All @@ -36,9 +36,9 @@ export default class SharePipelineStack extends Stack {
new ShareStage(scope, 'Prod', {
domain: 'share.kirschbaum.cloud',
delegation: {
parentDomain: 'kirschbaum.cloud',
accountId: '212836051001',
roleName: 'CloudshareDNSDelegationRole',
parentZoneId: 'Z0202936UCVSS5ELQXV6',
accountId: '058264224454',
roleName: 'CloudshareProdDnsDelegationRole',
},
keycloak: {
url: 'https://id.elite12.de',
Expand Down
1 change: 1 addition & 0 deletions lib/ShareUtilStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class ShareUtilStack extends Stack {
new route53.CrossAccountZoneDelegationRecord(this, 'DelegationRecord', {
delegatedZone: this.zone,
parentHostedZoneName: delegationOptions.parentDomain,
parentHostedZoneId: delegationOptions.parentZoneId,
delegationRole: iam.Role.fromRoleArn(this, 'DelegationRole', Stack.of(this).formatArn({
region: '', // IAM is global in each partition
service: 'iam',
Expand Down
6 changes: 5 additions & 1 deletion lib/interfaces/DelegationOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ export interface DelegationOptions {
/**
* The name of the parent zone (domain)
*/
parentDomain: string,
parentDomain?: string,
/**
* The id of the parent zone
*/
parentZoneId?: string,
/**
* The id of the account containing the parent zone
*/
Expand Down

0 comments on commit 8b4f80d

Please sign in to comment.