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

object declaration is missing #13293

Closed
Virsukh3177 opened this issue Feb 10, 2024 · 2 comments
Closed

object declaration is missing #13293

Virsukh3177 opened this issue Feb 10, 2024 · 2 comments
Assignees
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue
Milestone

Comments

@Virsukh3177
Copy link

Virsukh3177 commented Feb 10, 2024

I am facing the error is "The specified "object" declaration is missing the following required properties: "createNonExistentNsgs", "createNonExistentSubnets", "createNonExistentVnet", "name", "subnets", "whitelistedIps"" when I am trying to run the code with object data type.

what am I doing wrong?

import { VirtualNetworks, VirtualNetwork, Subnets, Subnet, Nsg } from './network-types.bicep'

// comment this declaration
param virtualNetwork object = {
  addressPrefix: [
    '10.2.0.0/16'
  ]
  whitelistedIps: []
  createNonExistentVnet: true
  createNonExistentSubnets: true
  createNonExistentNsgs: true
  resourceId: null
  name: 'vnet-test-prod-001'
  subnets: {
    primary: {
      cidr: 27
      name: 'snet-test-primary-001'
      addressPrefix: '10.2.0.0/27'
      isExisting: false
    }
  }
}

// uncomment this declaration to make it work

// param virtualNetwork VirtualNetwork = {
//   addressPrefix: [
//     '10.2.0.0/16'
//   ]
//   whitelistedIps: []
//   createNonExistentVnet: true
//   createNonExistentSubnets: true
//   createNonExistentNsgs: true
//   resourceId: null
//   name: 'vnet-test-prod-001'
//   subnets: {
//     primary: {
//       cidr: 27
//       name: 'snet-test-primary-001'
//       addressPrefix: '10.2.0.0/27'
//       isExisting: false
//     }
//   }
// }

module vnet 'test-vnet.bicep' = {
  name: 'test-vnet'
  params: {
    virtualNetwrok: virtualNetwork
  }
}
@cloudlene
Copy link

cloudlene commented Feb 12, 2024

What does the UDT declaration looks like?

@jeskew
Copy link
Contributor

jeskew commented Feb 21, 2024

@Virsukh3177 Could you try with Bicep 0.25.53?

I believe this issue has the same root cause as #13247, which was fixed in a patch release. The sample included above appears to compile without issue in the latest version of Bicep.

@jeskew jeskew added the Needs: Author Feedback Awaiting feedback from the author of the issue label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue
Projects
Archived in project
Development

No branches or pull requests

4 participants