Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Reference network interface in VM creation #284

Open
vishnujanardhanan opened this issue May 25, 2022 · 0 comments
Open

Reference network interface in VM creation #284

vishnujanardhanan opened this issue May 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@vishnujanardhanan
Copy link

Hi,
This is not a bug, but i need help with configuring the network interface in VM's spec. I'm using terrajet to create a VM in azure and it has a field called spec -> networkInterfaceIds. However I have defined Network interface and VM in the same composition file so not sure how i reference Network interface id in VM's spec? Attaching my compostion file for reference. Please help.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: compositiont0services.vj.com
labels:
provider: azure
vnet: crossplane-poc-new
spec:
compositeTypeRef:
apiVersion: vj.com/v1alpha1
kind: crdt0service
resources:

  • name: vnet
    base:
    apiVersion: network.azure.crossplane.io/v1alpha3
    kind: VirtualNetwork
    metadata:
    labels:
    provider: azure
    vnet: crossplane-poc-new
    spec:
    resourceGroupNameSelector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
    location: South India
    providerConfigRef:
    name: az-provider-config
    properties:
    addressSpace:
    addressPrefixes:
  • 10.2.0.0/24
  • name: resourcegroup
    base:
    apiVersion: azure.crossplane.io/v1alpha3
    kind: ResourceGroup
    metadata:
    labels:
    provider: azure
    vnet: crossplane-poc-new
    spec:
    location: South India
    providerConfigRef:
    name: az-provider-config
  • name: subnet
    base:
    apiVersion: network.azure.crossplane.io/v1alpha3
    kind: Subnet
    metadata:
    labels:
    provider: azure
    vnet: crossplane-poc-new
    spec:
    resourceGroupNameSelector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
    virtualNetworkNameSelector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
    location: South India
    providerConfigRef:
    name: az-provider-config
    properties:
    addressPrefix: 10.2.0.0/25
  • name: vm
    base:
    apiVersion: compute.azure.jet.crossplane.io/v1alpha1
    kind: LinuxVirtualMachine
    metadata:
    labels:
    provider: azure
    vnet: crossplane-poc-new
    spec:
    providerConfigRef:
    name: az-provider-config
    forProvider:
    adminUserName: azuser
    location: South India
    name: vm
    networkInterfaceIds: ====
    osDisk:
    caching: ==
    storageAccountType: ==
    size: Standard_B1s
    resourceGroupNameSelector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
  • name: nic
    base:
    apiVersion: compute.azure.jet.crossplane.io/v1alpha2
    kind: NetworkInterface
    metadata:
    labels:
    provider: azure
    vnet: crossplane-poc-new
    spec:
    providerConfigRef:
    name: az-provider-config
    forProvider:
    ipConfiguration:
  • name: aznic
    privateIpAddressAllocation: Dynamic
    subnetIdselector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
    location: South India
    name: vm
    resourceGroupNameSelector:
    matchControllerRef: true
    matchLabels:
    provider: azure
    vnet: crossplane-poc-new
@vishnujanardhanan vishnujanardhanan added the bug Something isn't working label May 25, 2022
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

No branches or pull requests

1 participant