Skip to content

Commit

Permalink
fix: add json tags to subnet (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-rodrigues authored Jun 9, 2022
1 parent 9f08e9c commit ab3113b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions resources/output/subnet/aws_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const AwsResourceName = "aws_subnet"

type AwsSubnet struct {
*common.AwsResource `hcl:",squash" default:"name=aws_subnet"`
CidrBlock string `hcl:"cidr_block"`
VpcId string `hcl:"vpc_id,expr"`
AvailabilityZone string `hcl:"availability_zone,optional" hcle:"omitempty"`
MapPublicIpOnLaunch bool `hcl:"map_public_ip_on_launch" hcle:"omitempty"`
CidrBlock string `hcl:"cidr_block" json:"cidr_block"`
VpcId string `hcl:"vpc_id,expr" json:"vpc_id"`
AvailabilityZone string `hcl:"availability_zone,optional" hcle:"omitempty" json:"availability_zone"`
MapPublicIpOnLaunch bool `hcl:"map_public_ip_on_launch" hcle:"omitempty" json:"map_public_ip_on_launch"`
}
6 changes: 3 additions & 3 deletions resources/output/subnet/azure_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const AzureResourceName = "azurerm_subnet"

type AzureSubnet struct {
*common.AzResource `hcl:",squash" default:"name=azurerm_subnet"`
AddressPrefixes []string `hcl:"address_prefixes"`
VirtualNetworkName string `hcl:"virtual_network_name,expr"`
ServiceEndpoints []string `hcl:"service_endpoints" hcle:"omitempty"`
AddressPrefixes []string `hcl:"address_prefixes" json:"address_prefixes"`
VirtualNetworkName string `hcl:"virtual_network_name,expr" json:"virtual_network_name"`
ServiceEndpoints []string `hcl:"service_endpoints" hcle:"omitempty" json:"service_endpoints"`
}

func (subnet *AzureSubnet) GetId() string {
Expand Down

0 comments on commit ab3113b

Please sign in to comment.