@devramps/cli 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1520,18 +1520,6 @@ function addOidcProviderResource(template, conditional = true) {
1520
1520
  }
1521
1521
  };
1522
1522
  }
1523
- function getOidcProviderArn(accountId, conditional = true) {
1524
- if (conditional) {
1525
- return {
1526
- "Fn::If": [
1527
- "CreateOIDCProvider",
1528
- { "Fn::GetAtt": ["DevRampsOIDCProvider", "Arn"] },
1529
- `arn:aws:iam::${accountId}:oidc-provider/${OIDC_PROVIDER_URL}`
1530
- ]
1531
- };
1532
- }
1533
- return { "Fn::GetAtt": ["DevRampsOIDCProvider", "Arn"] };
1534
- }
1535
1523
  function buildOidcTrustPolicy(accountId, subject) {
1536
1524
  return {
1537
1525
  Version: "2012-10-17",
@@ -1909,7 +1897,6 @@ function createTerraformStateBucketPolicy(bucketName, cicdAccountId, allowedAcco
1909
1897
  function generateOrgStackTemplate(options) {
1910
1898
  const { orgSlug, cicdAccountId, targetAccountIds } = options;
1911
1899
  const template = createBaseTemplate(`DevRamps Org Stack for ${orgSlug}`);
1912
- addOidcProviderResource(template, true);
1913
1900
  const kmsKeyPolicy = buildKmsKeyPolicy(cicdAccountId, targetAccountIds);
1914
1901
  template.Resources.DevRampsKMSKey = createKmsKeyResource(
1915
1902
  `DevRamps encryption key for org: ${orgSlug}`,
@@ -1973,10 +1960,6 @@ function generateOrgStackTemplate(options) {
1973
1960
  TerraformStateBucketArn: {
1974
1961
  Description: "ARN of the Terraform state bucket",
1975
1962
  Value: { "Fn::GetAtt": ["TerraformStateBucket", "Arn"] }
1976
- },
1977
- OIDCProviderArn: {
1978
- Description: "ARN of the OIDC provider",
1979
- Value: getOidcProviderArn(cicdAccountId, true)
1980
1963
  }
1981
1964
  };
1982
1965
  return template;
@@ -2656,6 +2639,14 @@ async function buildDeploymentPlan(pipelines, pipelineArtifacts, authData, curre
2656
2639
  const accountStacks = [];
2657
2640
  const accountStackName = getAccountStackName();
2658
2641
  const accountsWithStacks = /* @__PURE__ */ new Set();
2642
+ accountsWithStacks.add(cicdAccountId);
2643
+ accountStacks.push({
2644
+ stackType: "Account" /* ACCOUNT */,
2645
+ stackName: accountStackName,
2646
+ accountId: cicdAccountId,
2647
+ region: cicdRegion,
2648
+ action: await determineStackAction(accountStackName, cicdCredentials, cicdRegion)
2649
+ });
2659
2650
  for (const pipeline of pipelines) {
2660
2651
  for (const stage of pipeline.stages) {
2661
2652
  if (accountsWithStacks.has(stage.account_id)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devramps/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "DevRamps CLI - Bootstrap AWS infrastructure for CI/CD pipelines",
5
5
  "main": "dist/index.js",
6
6
  "bin": {