Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

[bugfix] Fixed passing in the list of supported services #62

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

patpicos
Copy link
Contributor

Added the missing encoding.

With the fix, the plan will succeed and allow apply:
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:

  • create

Terraform will perform the following actions:

  # module.blueprint_foundations_governance.module.builtin_policies.azurerm_policy_assignment.res_type[0] will be created
  + resource "azurerm_policy_assignment" "res_type" {
      + description          = "Policy Assignment with Terraform"
      + display_name         = "TF Restrict Deployment of specified Azure Resources"
      + enforcement_mode     = true
      + id                   = (known after apply)
      + name                 = "res_svc"
      + parameters           = jsonencode(
            {
              + listOfResourceTypesAllowed = {
                  + value = [
                      + "Microsoft.Network/publicIPAddresses",
                      + "Microsoft.Compute/disks",
                    ]
                }
            }
        )
      + policy_definition_id = "/providers/Microsoft.Authorization/policyDefinitions/a08ec900-254a-4555-9bf5-e42af04b5c5c"
      + scope                = "/subscriptions/1ae83116-7c3c-446d-8015-9ae244c26257"

      + identity {
          + principal_id = (known after apply)
          + tenant_id    = (known after apply)
          + type         = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Fixes: #61

@patpicos
Copy link
Contributor Author

patpicos commented Jul 22, 2020

I cant fix the failed builds. seems like a config issue on the builds themselves

Run az login --service-principal -u '' -p '' --tenant ''
usage: az login [-h] [--verbose] [--debug] [--only-show-errors]
                [--output {json,jsonc,yaml,yamlc,table,tsv,none}]
                [--query JMESPATH] [--username USERNAME] [--password PASSWORD]
                [--service-principal] [--tenant TENANT]
                [--allow-no-subscriptions] [-i] [--use-device-code]
                [--use-cert-sn-issuer]
az login: error: Expecting value: line 1 column 1 (char 0)

@arnaudlh arnaudlh self-assigned this Jul 23, 2020
@arnaudlh arnaudlh added the bug Something isn't working label Jul 23, 2020
@arnaudlh arnaudlh added this to the 2007 milestone Jul 23, 2020
@patpicos
Copy link
Contributor Author

Merci @arnaudlh

@arnaudlh arnaudlh merged commit f6b00ca into Azure:master Jul 27, 2020
@arnaudlh
Copy link
Member

thanks @patpicos

@patpicos patpicos deleted the patch-1 branch July 27, 2020 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] restrict_supported_svc = true returns error
2 participants