early-yak-11036
08/11/2023, 7:07 AMpulumi refresh
and maybe someone got the same error, its related to azure and DnsZones:
error: Preview failed: refreshing urn:pulumi:my-stack::infra.pulumi::azure:dns/zone:Zone::<http://my-url.com|my-url.com>: 1 error occurred:
* parsing "/subscriptions/my-subscription-id/resourceGroups/my-resource-group/providers/Microsoft.Network/dnszones/my-url.com": parsing segment "staticDnsZones": expected the segment "dnszones" to be "dnsZones"
any idea? Thanks! 🙂famous-fall-51654
08/11/2023, 1:12 PM$graphId = az ad sp list --query "[?appDisplayName=='Microsoft Graph'].appId | [0]" --all
$graphResourceId = az ad sp list --query "[?appDisplayName=='Microsoft Graph'].id | [0]" --all
melodic-doctor-70522
08/12/2023, 2:24 AMquaint-summer-19416
08/13/2023, 7:03 AMmelodic-doctor-70522
08/15/2023, 2:24 AMgateway_ip_configurations=[network.ApplicationGatewayIPConfigurationArgs(
name=data_conf["appGateway_conf"]["gateway_ip_configurations"]["name"],
subnet=network.SubnetArgs(
id=gateway_sbnt.id,
),
)],
frontend_ip_configurations=[network.ApplicationGatewayFrontendIPConfigurationArgs(
name=data_conf["appGateway_conf"]["frontend_ip_configurations"]["name"],
public_ip_address=network.PublicIPAddressArgs(
id=gateway_public_ip.id
)
)],
frontend_ports=[network.ApplicationGatewayFrontendPortArgs(
name=data_conf["appGateway_conf"]["frontend_ports"]["name"],
port=data_conf["appGateway_conf"]["frontend_ports"]["port"],
)],
backend_address_pools=[network.ApplicationGatewayBackendAddressPoolArgs(
name=data_conf["appGateway_conf"]["backend_address_pools"]["name"],
backend_addresses=[network.ApplicationGatewayBackendAddressArgs(
ip_address=VM_nic.ip_configurations[0].private_ip_address) for VM_nic in VM_nics]
)],
backend_http_settings_collection=[network.ApplicationGatewayBackendHttpSettingsArgs(
name= data_conf["appGateway_conf"]["backend_http_settings_collection"]["name"],
cookie_based_affinity=data_conf["appGateway_conf"]["backend_http_settings_collection"]["cookie_based_affinity"],
port=data_conf["appGateway_conf"]["backend_http_settings_collection"]["port"],
protocol=data_conf["appGateway_conf"]["backend_http_settings_collection"]["protocol"],
request_timeout=data_conf["appGateway_conf"]["backend_http_settings_collection"]["request_timeout"]
)],
http_listeners=[network.ApplicationGatewayHttpListenerArgs(
name= data_conf["appGateway_conf"]["http_listeners"]["name"],
protocol=data_conf["appGateway_conf"]["http_listeners"]["protocol"],
frontend_ip_configuration=network.SubResourceArgs(id=pulumi.Output.all(resourcegroup.name).apply(lambda args: f"/subscriptions/{data_conf['subscription_id']}/resourceGroups/{args[0]}/providers/Microsoft.Network/applicationGateways/frontendIPConfigurations/{data_conf['appGateway_conf']['frontend_ip_configurations']['name']}")),
frontend_port=network.SubResourceArgs(id=pulumi.Output.all(resourcegroup.name).apply(lambda args:f"/subscriptions/{data_conf['subscription_id']}/resourceGroups/{args[0]}/providers/Microsoft.Network/applicationGateways/frontendPorts/{data_conf['appGateway_conf']['frontend_ports']['name']}")),
)],
request_routing_rules=[network.ApplicationGatewayRequestRoutingRuleArgs(
name=data_conf["appGateway_conf"]["request_routing_rules"]["name"],
rule_type=data_conf["appGateway_conf"]["request_routing_rules"]["rule_type"],
priority=data_conf["appGateway_conf"]["request_routing_rules"]["priority"],
http_listener=network.SubResourceArgs(id= pulumi.Output.all(resourcegroup.name).apply(lambda args: f"/subscriptions/{data_conf['subscription_id']}/resourceGroups/{args[0]}/providers/Microsoft.Network/applicationGateways/httpListeners/{data_conf['appGateway_conf']['http_listeners']['name']}")),
backend_address_pool=network.SubResourceArgs(id=pulumi.Output.all(resourcegroup.name).apply(lambda args: f"/subscriptions/{data_conf['subscription_id']}/resourceGroups/{args[0]}/providers/Microsoft.Network/applicationGateways/backendAddressPools/{data_conf['appGateway_conf']['backend_address_pools']['name']}")),
backend_http_settings=network.SubResourceArgs(id=pulumi.Output.all(resourcegroup.name).apply(lambda args: f"/subscriptions/{data_conf['subscription_id']}/resourceGroups/{args[0]}/providers/Microsoft.Network/applicationGateways/backendHttpSettingsCollection/{data_conf['appGateway_conf']['backend_http_settings_collection']['name']}")),
)]
melodic-doctor-70522
08/15/2023, 2:34 AMazure-native:network:ApplicationGateway (ApplicationGateway1-654-archie-nonprod-eaus2):
error: Code="InvalidRequestFormat" Message="Cannot parse the request." Details=[{"code":"InvalidJsonReferenceFormat","message":"Reference Id /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/applicationGateways/frontendIPConfigurations/frontend_ip_configuration_appgateway is not formatted correctly. The Id is expected to reference resources of type applicationGateways/frontendIPConfigurations. Path properties.httpListeners[0].properties.frontendIPConfiguration."},{"code":"InvalidJsonReferenceFormat","message":"Reference Id /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/applicationGateways/frontendPorts/frontend_port_appgateway is not formatted correctly. The Id is expected to reference resources of type applicationGateways/frontendPorts. Path properties.httpListeners[0].properties.frontendPort."},{"code":"InvalidJsonReferenceFormat","message":"Reference Id /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/applicationGateways/backendAddressPools/vm_pools is not formatted correctly. The Id is expected to reference resources of type applicationGateways/backendAddressPools. Path properties.requestRoutingRules[0].properties.backendAddressPool."},{"code":"InvalidJsonReferenceFormat","message":"Reference Id /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/applicationGateways/backendHttpSettingsCollection/http_setting_appgateway is not formatted correctly. The Id is expected to reference resources of type applicationGateways/backendHttpSettingsCollection. Path properties.requestRoutingRules[0].properties.backendHttpSettings."},{"code":"InvalidJsonReferenceFormat","message":"Reference Id /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/applicationGateways/httpListeners/http_listener_appgateway is not formatted correctly. The Id is expected to reference resources of type applicationGateways/httpListeners. Path properties.requestRoutingRules[0].properties.httpListener."}]
ambitious-computer-3093
08/15/2023, 11:54 PMmelodic-doctor-70522
08/17/2023, 2:17 AMpulumi_synced_folder
package, it is to add files to my blob from my static website in azure, for example download the folder in the same AzureBlobFolder
resourcefew-postman-20852
08/17/2023, 8:55 AMnpm ci
). I normally don't specify version of the apis so it would make sense to only use the latest one. And this also helps on typescript not hanging for code completion in vscode.famous-fall-51654
08/17/2023, 6:34 PMsparse-intern-71089
08/21/2023, 9:04 PMfamous-fall-51654
08/25/2023, 7:40 AMpowerful-printer-57241
08/25/2023, 2:38 PMazure-native:clientId
and azure-native:clientSecret
properties in the stack YAML to authenticate against Azure.
Now, in the same code that is executed by Pulumi, we would like to access Azure Key Vault using the Microsoft SDK. However, just providing new DefaultAzureCredential()
to the Key Vault client does not work.
Is there a way to authenticate to Key Vault using the same identity that's defined by the azure-native:clientId
and azure-native:clientSecret
variables?crooked-scientist-50485
08/28/2023, 2:07 PMpulumi new \
--secrets-provider="azurekeyvault:<http://xxxxxxxx.vault.azure.net/keys/xxxx|xxxxxxxx.vault.azure.net/keys/xxxx>" \
azure-typescript
The error I get is this:
Sorry, could not create stack 'dev': invalid keyID "https://"; must match ^(https://.+\.vault\.(?:[a-z\d-.]+)/)keys/(.+)$ []
Any idea what is going on?crooked-scientist-50485
08/28/2023, 4:50 PMSorry, could not create stack 'dev': secrets (code=PermissionDenied): keyvault.BaseClient#Encrypt: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="Forbidden" Message="Caller is not authorized to perform action on resource.\r\nIf role assignments, deny assignments or role definitions were changed recently, please observe propagation time.
Caller: appid=[REDACTED];oid=[REDACTED];iss=<https://sts.windows.net/[REDACTED]/>
Action: 'Microsoft.KeyVault/vaults/keys/encrypt/action'
Resource: '/subscriptions/[REDACTED]/resourcegroups/[REDACTED]/providers/microsoft.keyvault/vaults/[REDACTED]/keys/pulumi'
Assignment: (not found)
DecisionReason: 'DeniedWithNoValidRBAC'
Vault: [REDACTED];location=[REDACTED]" InnerError={"code":"ForbiddenByRbac"}
After trying everything I can think of I've now assigned the service principal to Owner of the key vault and still I get the same error. Any ideas what I'm doing wrong?
Command:
pulumi new \
--secrets-provider="<azurekeyvault://xxxxxxxxx.vault.azure.net/keys/xxxx>" \
azure-typescript
Environment vars:
AZURE_STORAGE_ACCOUNT=[REDACTED]
AZURE_STORAGE_KEY=[REDACTED]
AZURE_CLIENT_ID=[REDACTED]
AZURE_CLIENT_SECRET=[REDACTED]
AZURE_TENANT_ID=[REDACTED]
wonderful-spoon-89039
08/29/2023, 11:30 AMfew-postman-20852
09/01/2023, 7:44 AMcalm-doctor-76791
09/04/2023, 3:42 PMfast-sandwich-30809
09/05/2023, 1:13 PMProvider
into the options of a v1 resource, what would happen 😅fast-sandwich-30809
09/06/2023, 5:41 PMambitious-computer-3093
09/06/2023, 11:08 PMwitty-vegetable-61961
09/07/2023, 1:03 PMwitty-vegetable-61961
09/07/2023, 8:39 PMbumpy-glass-30283
09/08/2023, 8:22 AMworried-knife-31967
09/11/2023, 12:59 PMworried-dress-4788
09/11/2023, 2:24 PMworried-knife-31967
09/11/2023, 3:40 PMmelodic-doctor-70522
09/14/2023, 12:57 AMazure-native:network:NetworkInterface (NIC-VMWindows1-063-100-160):
error: Code="NicInUse" Message="Network Interface /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Network/networkInterfaces/NIC-VMWindows1-063-100 -160 is used by existing resource /subscriptions/8e23e0ca-e424-495e-b142-813621dbb51f/resourceGroups/rg-archie-nonprod-eaus2/providers/Microsoft.Compute/virtualMachines/VMWindows1-063-archie-nonprod-eaus2-160- 4. In order to delete the network interface, it must be dissociated from the resource. To learn more, see <http://aka.ms/deletenic|aka.ms/deletenic>." Details=[]
abundant-knife-92318
09/15/2023, 2:55 PMazure-native.web.WebAppApplicationSettings
from wiping all the other settings in a Web App? It's applying the configs I am telling it to apply, but all the other configs (for example, those set by the application deployment) get completely wiped.witty-vegetable-61961
09/15/2023, 3:09 PM