Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

FEATURES:
- Add metering config support to `meshstack_mesh_platform` resource and data source.
- Add quotas to `meshstack_landingzone` resource and data source.

FIXES:
- Correctly model nullable platform config fields.
Expand Down
24 changes: 15 additions & 9 deletions client/landingzone.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,27 @@ type MeshLandingZoneMetadata struct {
}

type MeshLandingZoneSpec struct {
DisplayName string `json:"displayName" tfsdk:"display_name"`
Description string `json:"description" tfsdk:"description"`
AutomateDeletionApproval bool `json:"automateDeletionApproval" tfsdk:"automate_deletion_approval"`
AutomateDeletionReplication bool `json:"automateDeletionReplication" tfsdk:"automate_deletion_replication"`
InfoLink *string `json:"infoLink,omitempty" tfsdk:"info_link"`
PlatformRef PlatformRef `json:"platformRef" tfsdk:"platform_ref"`
PlatformProperties *PlatformProperties `json:"platformProperties,omitempty" tfsdk:"platform_properties"`
DisplayName string `json:"displayName" tfsdk:"display_name"`
Description string `json:"description" tfsdk:"description"`
AutomateDeletionApproval bool `json:"automateDeletionApproval" tfsdk:"automate_deletion_approval"`
AutomateDeletionReplication bool `json:"automateDeletionReplication" tfsdk:"automate_deletion_replication"`
InfoLink *string `json:"infoLink,omitempty" tfsdk:"info_link"`
PlatformRef MeshLandingZonePlatformRef `json:"platformRef" tfsdk:"platform_ref"`
PlatformProperties *MeshLandingZonePlatformProperties `json:"platformProperties,omitempty" tfsdk:"platform_properties"`
Quotas []MeshLandingZoneQuota `json:"quotas" tfsdk:"quotas"`
}

type MeshLandingZoneStatus struct {
Disabled bool `json:"disabled" tfsdk:"disabled"`
Restricted bool `json:"restricted" tfsdk:"restricted"`
}

type PlatformRef struct {
type MeshLandingZonePlatformRef struct {
Uuid string `json:"uuid" tfsdk:"uuid"`
Kind string `json:"kind" tfsdk:"kind"`
}

type PlatformProperties struct {
type MeshLandingZonePlatformProperties struct {
Type string `json:"type" tfsdk:"type"`
Aws *AwsPlatformProperties `json:"aws" tfsdk:"aws"`
Aks *AksPlatformProperties `json:"aks" tfsdk:"aks"`
Expand All @@ -55,6 +56,11 @@ type PlatformProperties struct {
OpenShift *OpenShiftPlatformProperties `json:"openshift" tfsdk:"openshift"`
}

type MeshLandingZoneQuota struct {
Key string `json:"key" tfsdk:"key"`
Value int64 `json:"value" tfsdk:"value"`
}

type MeshLandingZoneCreate struct {
ApiVersion string `json:"apiVersion" tfsdk:"api_version"`
Metadata MeshLandingZoneMetadata `json:"metadata" tfsdk:"metadata"`
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/landingzone.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Read-Only:
- `info_link` (String) Link to additional information about the landing zone.
- `platform_properties` (Attributes) Platform-specific configuration options. (see [below for nested schema](#nestedatt--spec--platform_properties))
- `platform_ref` (Attributes) Reference to the platform this landing zone belongs to. (see [below for nested schema](#nestedatt--spec--platform_ref))
- `quotas` (Attributes List) Quota definitions for this landing zone. (see [below for nested schema](#nestedatt--spec--quotas))

<a id="nestedatt--spec--platform_properties"></a>
### Nested Schema for `spec.platform_properties`
Expand Down Expand Up @@ -301,6 +302,15 @@ Read-Only:
- `uuid` (String) UUID of the platform.


<a id="nestedatt--spec--quotas"></a>
### Nested Schema for `spec.quotas`

Read-Only:

- `key` (String) Quota key identifier.
- `value` (Number) Quota value.



<a id="nestedatt--status"></a>
### Nested Schema for `status`
Expand Down
10 changes: 10 additions & 0 deletions docs/resources/landingzone.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Required:
Optional:

- `info_link` (String) Link to additional information about the landing zone.
- `quotas` (Attributes List) Quota definitions for this landing zone. (see [below for nested schema](#nestedatt--spec--quotas))

<a id="nestedatt--spec--platform_properties"></a>
### Nested Schema for `spec.platform_properties`
Expand Down Expand Up @@ -304,6 +305,15 @@ Required:
- `uuid` (String) UUID of the platform.


<a id="nestedatt--spec--quotas"></a>
### Nested Schema for `spec.quotas`

Required:

- `key` (String) Quota key identifier. Must match a quota key that has been defined on the plaform.
- `value` (Number) Quota value.



<a id="nestedatt--status"></a>
### Nested Schema for `status`
Expand Down
50 changes: 30 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ go 1.24.0

require (
github.com/hashicorp/terraform-plugin-docs v0.24.0
github.com/hashicorp/terraform-plugin-framework v1.15.1
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.27.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
github.com/hashicorp/terraform-plugin-framework v1.16.1
github.com/hashicorp/terraform-plugin-framework-validators v0.19.0
github.com/hashicorp/terraform-plugin-go v0.29.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1
github.com/hashicorp/terraform-plugin-testing v1.13.3
)

require (
Expand All @@ -17,60 +18,69 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.7 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.3 // indirect
github.com/hashicorp/go-plugin v1.7.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.9.2 // indirect
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.24.0 // indirect
github.com/hashicorp/terraform-json v0.27.2 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
github.com/hashicorp/terraform-plugin-log v0.10.0 // indirect
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/oklog/run v1.2.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.7 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.17.0 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/crypto v0.44.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.30.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/grpc v1.72.1 // indirect
google.golang.org/protobuf v1.36.6 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.38.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba // indirect
google.golang.org/grpc v1.76.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading