Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add terraform-azurerm-altinn-modules to platform repo list #1204

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

tjololo
Copy link
Member

@tjololo tjololo commented Jan 7, 2025

Description

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

  • Configuration Update
    • Added new repository terraform-azurerm-altinn-modules to the Platform product configuration

@tjololo tjololo requested a review from a team as a code owner January 7, 2025 10:20
Copy link

coderabbitai bot commented Jan 7, 2025

📝 Walkthrough

Walkthrough

The pull request involves updating the products.yaml configuration file by adding a new repository terraform-azurerm-altinn-modules to the existing list of repositories for the "Platform" product. This modification expands the resources associated with the Platform product under the GitHub owner altinn, potentially introducing new infrastructure or module capabilities.

Changes

File Change Summary
products.yaml Added new repository terraform-azurerm-altinn-modules to the "Platform" product's repository list

The changes are minimal and focused on extending the configuration for the Platform product by introducing an additional repository to its existing set of resources.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
products.yaml (1)

13-13: Consider adding documentation reference.

Since this is a Terraform module repository being added to the platform, it would be helpful to include a link to its documentation or a brief description of its purpose in the PR description.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 130f72a and 005d487.

📒 Files selected for processing (1)
  • products.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
products.yaml (1)

13-13: Verify repository existence and access.

The repository name follows the standard Terraform module naming convention. Let's verify its existence and accessibility.

✅ Verification successful

Repository verification successful

The repository terraform-azurerm-altinn-modules exists in the Altinn organization, is publicly accessible, and contains Terraform modules as intended.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the repository exists and is accessible
gh repo view altinn/terraform-azurerm-altinn-modules --json name,isPrivate,description

Length of output: 202

Copy link

github-actions bot commented Jan 7, 2025

Terraform environment prod

Format and Style 🖌success

Initialization ⚙️success

Validation 🤖success

Validation Output


Warning: Deprecated attribute

  on azure_arm.tf line 252, in resource "azurerm_role_assignment" "product_admins_storage_blob_owner":
 252:   scope                = azurerm_storage_container.container.resource_manager_id

The attribute "resource_manager_id" is deprecated. Refer to the provider
documentation for details.

(and 4 more similar warnings elsewhere)
Success! The configuration is valid, but there were some validation warnings
as shown above.


Plan 📖success

Show Plan

[Lines containing Refreshing state removed]
[Maybe further truncated see logs for complete plan output]
Acquiring state lock. This may take a few moments...
data.azuread_application_published_app_ids.well_known: Reading...
data.azuread_client_config.current: Reading...
data.azuread_application_published_app_ids.well_known: Read complete after 0s [id=appIds]
data.azuread_client_config.current: Read complete after 0s [id=cd0026d8-283b-4a55-9bfa-d0ef4a8ba21c-f03f7579-5f39-4d7f-bcea-8e5cb6d7aca4-02b17d28-7ec8-4084-92ce-d26051fa4998]
data.azuread_service_principal.msgraph: Reading...
data.azuread_service_principal.msgraph: Read complete after 0s [id=b9d7b3d8-a063-4e34-89d9-15db56e22d42]
data.azuread_directory_object.current: Reading...
data.azuread_directory_object.current: Read complete after 0s [id=02b17d28-7ec8-4084-92ce-d26051fa4998]
data.azuread_service_principal.current[0]: Reading...
data.azuread_service_principal.current[0]: Read complete after 0s [id=02b17d28-7ec8-4084-92ce-d26051fa4998]
data.azurerm_subscription.current: Reading...
data.azurerm_role_definition.reader: Reading...
data.azurerm_resource_group.tfstate: Reading...
data.azurerm_role_definition.storage_blob_reader_data_access: Reading...
data.azurerm_role_definition.contributor: Reading...
data.azurerm_role_definition.user_access_administrator: Reading...
data.azurerm_role_definition.storage_blob_data_owner: Reading...
data.azurerm_role_definition.azure_kubernetes_service_cluster_user_role: Reading...
data.azurerm_subscription.current: Read complete after 1s [id=/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2]
data.azurerm_role_definition.user_access_administrator: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9]
data.azurerm_role_definition.storage_blob_data_owner: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b]
data.azurerm_role_definition.reader: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7]
data.azurerm_role_definition.contributor: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c]
data.azurerm_role_definition.azure_kubernetes_service_cluster_user_role: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/4abbcc35-e782-43d8-92c5-2d3f1bd2253f]
data.azurerm_role_definition.storage_blob_reader_data_access: Read complete after 1s [id=/providers/Microsoft.Authorization/roleDefinitions/c12c1c16-33a1-487b-954d-41c89c60f349]
data.azurerm_resource_group.tfstate: Read complete after 1s [id=/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # azuread_application.product["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azuread_application" "product" {
      + app_role_ids                = (known after apply)
      + application_id              = (known after apply)
      + client_id                   = (known after apply)
      + disabled_by_microsoft       = (known after apply)
      + display_name                = "GitHub: altinn/terraform-azurerm-altinn-modules - Dev"
      + id                          = (known after apply)
      + logo_url                    = (known after apply)
      + oauth2_permission_scope_ids = (known after apply)
      + object_id                   = (known after apply)
      + prevent_duplicate_names     = false
      + publisher_domain            = (known after apply)
      + sign_in_audience            = "AzureADMyOrg"
      + tags                        = (known after apply)
      + template_id                 = (known after apply)
    }

  # azuread_application.product["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azuread_application" "product" {
      + app_role_ids                = (known after apply)
      + application_id              = (known after apply)
      + client_id                   = (known after apply)
      + disabled_by_microsoft       = (known after apply)
      + display_name                = "GitHub: altinn/terraform-azurerm-altinn-modules - Prod"
      + id                          = (known after apply)
      + logo_url                    = (known after apply)
      + oauth2_permission_scope_ids = (known after apply)
      + object_id                   = (known after apply)
      + prevent_duplicate_names     = false
      + publisher_domain            = (known after apply)
      + sign_in_audience            = "AzureADMyOrg"
      + tags                        = (known after apply)
      + template_id                 = (known after apply)
    }

  # azuread_application.reader will be updated in-place
  ~ resource "azuread_application" "reader" {
        id                             = "/applications/f2259af8-0975-4e83-925f-3ccdf18da571"
        tags                           = []
        # (16 unchanged attributes hidden)

      - required_resource_access {
          - resource_app_id = "00000003-0000-0000-c000-000000000000" -> null

          - resource_access {
              - id   = "9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30" -> null
              - type = "Role" -> null
            }
          - resource_access {
              - id   = "5b567255-7703-4780-807c-7be8301ae99b" -> null
              - type = "Role" -> null
            }
        }

        # (6 unchanged blocks hidden)
    }

  # azuread_application_api_access.example_msgraph will be created
  + resource "azuread_application_api_access" "example_msgraph" {
      + api_client_id  = "00000003-0000-0000-c000-000000000000"
      + application_id = "/applications/005b1c70-6fa7-4205-9fa1-8b7a53713238"
      + id             = (known after apply)
      + role_ids       = [
          + "1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9",
          + "62a82d76-70ea-41e2-9197-370581804d09",
        ]
    }

  # azuread_application_federated_identity_credential.oidc_branch["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_branch" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of branch 'main' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.branch.main"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:ref:refs/heads/main"
    }

  # azuread_application_federated_identity_credential.oidc_branch["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_branch" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of branch 'main' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.branch.main"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:ref:refs/heads/main"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-at21"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'at21' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.at21"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:at21"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-at22"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'at22' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.at22"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:at22"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-at23"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'at23' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.at23"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:at23"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-at24"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'at24' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.at24"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:at24"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-at25"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'at25' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.at25"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:at25"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-dev"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'dev' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.dev"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:dev"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-grafana"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'grafana' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.grafana"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:grafana"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-test"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'test' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.test"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:test"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-dev-yt01"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'yt01' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.yt01"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:yt01"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-prod-prod"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'prod' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.prod"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:prod"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-prod-staging"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'staging' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.staging"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:staging"
    }

  # azuread_application_federated_identity_credential.oidc_environments["pap-altinn-terraform-azurerm-altinn-modules-prod-tt02"] will be created
  + resource "azuread_application_federated_identity_credential" "oidc_environments" {
      + application_id        = (known after apply)
      + application_object_id = (known after apply)
      + audiences             = [
          + "api://AzureADTokenExchange",
        ]
      + credential_id         = (known after apply)
      + description           = "Allow GitHub actions run within the context of environment 'tt02' from the repository https://github.com/altinn/terraform-azurerm-altinn-modules to have access to the app registration"
      + display_name          = "github.altinn.terraform-azurerm-altinn-modules.environment.tt02"
      + id                    = (known after apply)
      + issuer                = "https://token.actions.githubusercontent.com"
      + subject               = "repo:altinn/terraform-azurerm-altinn-modules:environment:tt02"
    }

  # azuread_service_principal.product["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azuread_service_principal" "product" {
      + account_enabled             = true
      + app_role_ids                = (known after apply)
      + app_roles                   = (known after apply)
      + application_id              = (known after apply)
      + application_tenant_id       = (known after apply)
      + client_id                   = (known after apply)
      + display_name                = (known after apply)
      + homepage_url                = (known after apply)
      + id                          = (known after apply)
      + logout_url                  = (known after apply)
      + oauth2_permission_scope_ids = (known after apply)
      + oauth2_permission_scopes    = (known after apply)
      + object_id                   = (known after apply)
      + redirect_uris               = (known after apply)
      + saml_metadata_url           = (known after apply)
      + service_principal_names     = (known after apply)
      + sign_in_audience            = (known after apply)
      + tags                        = (known after apply)
      + type                        = (known after apply)
    }

  # azuread_service_principal.product["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azuread_service_principal" "product" {
      + account_enabled             = true
      + app_role_ids                = (known after apply)
      + app_roles                   = (known after apply)
      + application_id              = (known after apply)
      + application_tenant_id       = (known after apply)
      + client_id                   = (known after apply)
      + display_name                = (known after apply)
      + homepage_url                = (known after apply)
      + id                          = (known after apply)
      + logout_url                  = (known after apply)
      + oauth2_permission_scope_ids = (known after apply)
      + oauth2_permission_scopes    = (known after apply)
      + object_id                   = (known after apply)
      + redirect_uris               = (known after apply)
      + saml_metadata_url           = (known after apply)
      + service_principal_names     = (known after apply)
      + sign_in_audience            = (known after apply)
      + tags                        = (known after apply)
      + type                        = (known after apply)
    }

  # azurerm_app_configuration.state will be updated in-place
  ~ resource "azurerm_app_configuration" "state" {
        id                         = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.AppConfiguration/configurationStores/altinnterraformappconf02"
        name                       = "altinnterraformappconf02"
      ~ tags                       = {
          - "costcenter" = "altinn3"
          - "createdAt"  = "09-07-2024 09:55:43 UTC"
          - "createdBy"  = "Bengt Rino Fredh"
          - "modifiedAt" = "13-12-2024 11:44:00 UTC"
          - "modifiedBy" = "GitHub: Altinn/altinn-platform - Reader"
          - "repository" = "github.com/Altinn/altinn-platform"
          - "solution"   = "platform"
        } -> (known after apply)
        # (11 unchanged attributes hidden)
    }

  # azurerm_role_assignment.appregg["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azurerm_role_assignment" "appregg" {
      + condition                        = <<-EOT
            (
             (
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/deleteBlobVersion/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/immutableStorage/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/manageOwnership/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/permanentDelete/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/modifyPermissions/action'})
            )
            
             OR
             (
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/dev'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/test'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/at21'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/at22'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/at23'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/at24'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/at25'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/yt01'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/grafana'
              OR
                  @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/~/EOT'
             )
            )
        EOT
      + condition_version                = "2.0"
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Blob Data Owner"
      + scope                            = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.Storage/storageAccounts/altinnterraformstorage02/blobServices/default/containers/tfstates"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.appregg["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azurerm_role_assignment" "appregg" {
      + condition                        = <<-EOT
            (
             (
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/deleteBlobVersion/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/immutableStorage/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/manageOwnership/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/permanentDelete/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/modifyPermissions/action'})
            )
            
             OR
             (
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/staging'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/tt02'
              OR
              
              @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules/environments/prod'
              OR
                  @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/~/EOT'
             )
            )
        EOT
      + condition_version                = "2.0"
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Blob Data Owner"
      + scope                            = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.Storage/storageAccounts/altinnterraformstorage02/blobServices/default/containers/tfstates"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.apps_contributor["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azurerm_role_assignment" "apps_contributor" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Contributor"
      + scope                            = "/providers/Microsoft.Management/managementGroups/PAP-Dev"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.apps_contributor["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azurerm_role_assignment" "apps_contributor" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Contributor"
      + scope                            = "/providers/Microsoft.Management/managementGroups/PAP-Prod"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.apps_user_access_administrator["pap-altinn-terraform-azurerm-altinn-modules-dev"] will be created
  + resource "azurerm_role_assignment" "apps_user_access_administrator" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "User Access Administrator"
      + scope                            = "/providers/Microsoft.Management/managementGroups/PAP-Dev"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.apps_user_access_administrator["pap-altinn-terraform-azurerm-altinn-modules-prod"] will be created
  + resource "azurerm_role_assignment" "apps_user_access_administrator" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "User Access Administrator"
      + scope                            = "/providers/Microsoft.Management/managementGroups/PAP-Prod"
      + skip_service_principal_aad_check = true
    }

  # azurerm_role_assignment.products["pap-dev"] must be replaced
-/+ resource "azurerm_role_assignment" "products" {
      ~ condition                        = <<-EOT # forces replacement
            (
              (
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/deleteBlobVersion/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/immutableStorage/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/manageOwnership/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/permanentDelete/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/modifyPermissions/action'})
            )
            
              OR
              (
                
                  @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/altinn-platform'
                  OR
          +     
          +       @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules'
          +       OR
                      @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/~/EOT'
              )
            )
        EOT
      ~ id                               = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.Storage/storageAccounts/altinnterraformstorage02/blobServices/default/containers/tfstates/providers/Microsoft.Authorization/roleAssignments/76fa59e0-154e-5bd8-db17-cfd3cc2c1f66" -> (known after apply)
      ~ name                             = "76fa59e0-154e-5bd8-db17-cfd3cc2c1f66" -> (known after apply)
      ~ principal_type                   = "Group" -> (known after apply)
      ~ role_definition_id               = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b" -> (known after apply)
      + skip_service_principal_aad_check = (known after apply)
        # (4 unchanged attributes hidden)
    }

  # azurerm_role_assignment.products["pap-prod"] must be replaced
-/+ resource "azurerm_role_assignment" "products" {
      ~ condition                        = <<-EOT # forces replacement
            (
              (
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/deleteBlobVersion/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/immutableStorage/runAsSuperUser/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/manageOwnership/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/permanentDelete/action'})
              AND
              !(ActionMatches{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/modifyPermissions/action'})
            )
            
              OR
              (
                
                  @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/altinn-platform'
                  OR
          +     
          +       @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/terraform-azurerm-altinn-modules'
          +       OR
                      @Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringStartsWith 'github.com/altinn/~/EOT'
              )
            )
        EOT
      ~ id                               = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.Storage/storageAccounts/altinnterraformstorage02/blobServices/default/containers/tfstates/providers/Microsoft.Authorization/roleAssignments/b6bd734c-5822-04d7-2b04-2921cd456e65" -> (known after apply)
      ~ name                             = "b6bd734c-5822-04d7-2b04-2921cd456e65" -> (known after apply)
      ~ principal_type                   = "Group" -> (known after apply)
      ~ role_definition_id               = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b" -> (known after apply)
      + skip_service_principal_aad_check = (known after apply)
        # (4 unchanged attributes hidden)
    }

  # azurerm_storage_account.backend will be updated in-place
  ~ resource "azurerm_storage_account" "backend" {
        id                                = "/subscriptions/d43d5057-8389-40d5-88c4-04db9275cbf2/resourceGroups/terraform-rg/providers/Microsoft.Storage/storageAccounts/altinnterraformstorage02"
        name                              = "altinnterraformstorage02"
      ~ tags                              = {
          - "costcenter" = "altinn3"
          - "createdAt"  = "09-07-2024 09:55:43 UTC"
          - "createdBy"  = "Bengt Rino Fredh"
          - "modifiedAt" = "13-12-2024 11:44:00 UTC"
          - "modifiedBy" = "GitHub: Altinn/altinn-platform - Reader"
          - "repository" = "github.com/Altinn/altinn-platform"
          - "solution"   = "platform"
        } -> (known after apply)
        # (35 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 27 to add, 3 to change, 2 to destroy.

Warning: Argument is deprecated

  with azurerm_storage_container.container,
  on azure_arm.tf line 145, in resource "azurerm_storage_container" "container":
 145:   storage_account_name = azurerm_storage_account.backend.name

the  property has been deprecated in favour of
 and will be removed in version 5.0 of the Provider.

Warning: Deprecated attribute

  on azure_arm.tf line 252, in resource "azurerm_role_assignment" "product_admins_storage_blob_owner":
 252:   scope                = azurerm_storage_container.container.resource_manager_id

The attribute "resource_manager_id" is deprecated. Refer to the provider
documentation for details.

(and 39 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan.out

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan.out"
Releasing state lock. This may take a few moments...

Context Values
Pusher @tjololo
Action push
Working Directory ./infrastructure/products
State File github.com/altinn/altinn-platform/environments/prod/products.tfstate
Plan File github.com_altinn_altinn-platform_environments_prod_products.tfstate.tfplan

@tjololo tjololo merged commit c5b9741 into main Jan 7, 2025
6 checks passed
@tjololo tjololo deleted the add-tf-modules-repo branch January 7, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants