Update DSA dependencies (#5)
Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
d5906cb6b1
commit
6800f7a421
32 changed files with 300 additions and 300 deletions
|
|
@ -35,7 +35,7 @@ data "stackit_logme_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ data "stackit_mariadb_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ data "stackit_opensearch_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ data "stackit_postgresql_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ data "stackit_rabbitmq_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ data "stackit_redis_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource identifier.
|
||||
- `image_url` (String)
|
||||
- `name` (String) Instance name.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `parameters` (Attributes) (see [below for nested schema](#nestedatt--parameters))
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
- `plan_name` (String) The selected plan name.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_logme_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the LogMe instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_mariadb_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the MariaDB instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_opensearch_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the OpenSearch instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_postgresql_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the PostgreSQL instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_rabbitmq_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the RabbitMQ instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ resource "stackit_redis_instance" "example" {
|
|||
- `id` (String) Terraform's internal resource ID.
|
||||
- `image_url` (String)
|
||||
- `instance_id` (String) ID of the Redis instance.
|
||||
- `organization_guid` (String)
|
||||
- `cf_organization_guid` (String)
|
||||
- `plan_id` (String) The selected plan ID.
|
||||
|
||||
<a id="nestedatt--parameters"></a>
|
||||
|
|
|
|||
12
go.mod
12
go.mod
|
|
@ -13,13 +13,13 @@ require (
|
|||
github.com/stackitcloud/stackit-sdk-go/core v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/argus v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/dns v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.2.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.1.0
|
||||
github.com/stackitcloud/stackit-sdk-go/services/ske v0.1.0
|
||||
golang.org/x/mod v0.12.0
|
||||
|
|
|
|||
24
go.sum
24
go.sum
|
|
@ -126,20 +126,20 @@ github.com/stackitcloud/stackit-sdk-go/services/argus v0.1.0 h1:kjAYf7WnjhQ2JlYi
|
|||
github.com/stackitcloud/stackit-sdk-go/services/argus v0.1.0/go.mod h1:9Y9MzEOos9xFFCs6YdYWb0k8Ij4JrJYfYGro9b1pVUY=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/dns v0.1.0 h1:PEfzbpktaK7Fj8O8zxLM3bpXwazmGhG59D15Vi8z/sE=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/dns v0.1.0/go.mod h1:eD6fRbn/pS9sdRYeq3EBKvFj2qlDu25Ir/doWfPaBcI=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.1.0 h1:3PQQniOQIxGQjYNpkukjivvcvO0PjIaPGh7JHwC6888=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.1.0/go.mod h1:KkWI0vWfBHRepIrH0VT2e1xwf1WaaNb/zPfSTRXAXjs=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.1.0 h1:puJISDlTEKO9ROZLzzjfijUEe0sODK2WK4TUiHUmbJI=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.1.0/go.mod h1:uTotoums0lfsmlTQVP5bYz4wWmfWlLuFx9i1ZzAyAkA=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.1.0 h1:t/uLNsqkpzARY9kfGR8pahfwScDdJZ+bRbZCGZ9o1lk=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.1.0/go.mod h1:pTTPSxx/BpcAm0ttcH+g4AiovC+oT7lXqca2C1XOxzY=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.2.0 h1:DzG8h4irPUWUxa+s2HHXEfsanVmlcX2t+hQ4d4IcaXU=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/logme v0.2.0/go.mod h1:KkWI0vWfBHRepIrH0VT2e1xwf1WaaNb/zPfSTRXAXjs=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.2.0 h1:lnqYVQ1kjMDJSVvKJjZW8eY1adWXlCiX5jIXyn2lOzg=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.2.0/go.mod h1:uTotoums0lfsmlTQVP5bYz4wWmfWlLuFx9i1ZzAyAkA=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.2.0 h1:pONEMH+p9xR1ACDEH6E1Jl5dnU1DixoJGD2iPWQOVuI=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.2.0/go.mod h1:pTTPSxx/BpcAm0ttcH+g4AiovC+oT7lXqca2C1XOxzY=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.1.0 h1:vm3AgvTA6TaHd0WpmzKT6HY6fSLOJUNPslqeLByO5P4=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.1.0/go.mod h1:sPEBUNRxaEsyhVOQKZrUdebexVX/z1RbvUFXxXOrICo=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.1.0 h1:/P9LOqYbbMso7FP2wfqqsUKbBrWVlb73vflgCA8N/rI=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.1.0/go.mod h1:9tfn47ltmTxuuchpn0Ui2n1KHMk4L/6T3K04NysSkTs=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.1.0 h1:PSNXnc5QUOvYjIL4yYk3vLd0Ri9Lzu06MTfYEKOx1ys=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.1.0/go.mod h1:TKYrlRjk4WJROlC23Wo6TuXntgYu8afkJfYtDd2JdiQ=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.1.0 h1:sXbTo85QAcZ1hdZWKf3ZM+sdgBca1yYrrTiwS0ny4tY=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.1.0/go.mod h1:7n6KxrNErscuXKGvXK93qEqd9jg9X9IT4tSGR2TsSg8=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.2.0 h1:SyFNHUu/XGEqGLW+blt9wrRuJ/VtWVNQVM65rvgAnRM=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.2.0/go.mod h1:9tfn47ltmTxuuchpn0Ui2n1KHMk4L/6T3K04NysSkTs=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.2.0 h1:pFHZcqal/QtY9uP9HSq6n+Kn88nVR6PCU4VTkSMFG3A=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.2.0/go.mod h1:TKYrlRjk4WJROlC23Wo6TuXntgYu8afkJfYtDd2JdiQ=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.2.0 h1:pAX6rmvs/Z1BV+2Tl5PD8/940zr4QWe5xNpPCuCzsp8=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/redis v0.2.0/go.mod h1:7n6KxrNErscuXKGvXK93qEqd9jg9X9IT4tSGR2TsSg8=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.1.0 h1:3kvXPm9EeJQA3xe3nV4GQu+dPLoAeErza2g0xjWPMJo=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.1.0/go.mod h1:VhGU0mhxY7FQj02evme9Xxtyo/H5iOlrU38i3wY7krw=
|
||||
github.com/stackitcloud/stackit-sdk-go/services/ske v0.1.0 h1:nifb5LIei6d/8B7wKzqyxZ/u8lT6Dd9bFSpyOxX0kU4=
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -212,7 +212,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
stringplanmodifier.UseStateForUnknown(),
|
||||
},
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
PlanModifiers: []planmodifier.String{
|
||||
stringplanmodifier.UseStateForUnknown(),
|
||||
|
|
@ -455,7 +455,7 @@ func mapFields(instance *logme.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
|
|
|
|||
|
|
@ -21,46 +21,46 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&logme.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&logme.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"sgw_acl": "acl",
|
||||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"sgw_acl": types.StringValue("acl"),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -197,7 +197,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -436,7 +436,7 @@ func mapFields(instance *mariadb.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
|
|
|
|||
|
|
@ -21,46 +21,46 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&mariadb.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&mariadb.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"sgw_acl": "acl",
|
||||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"sgw_acl": types.StringValue("acl"),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -197,7 +197,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -436,7 +436,7 @@ func mapFields(instance *opensearch.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -21,46 +21,46 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&opensearch.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&opensearch.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"sgw_acl": "acl",
|
||||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"sgw_acl": types.StringValue("acl"),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -238,7 +238,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
stringplanmodifier.UseStateForUnknown(),
|
||||
},
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
PlanModifiers: []planmodifier.String{
|
||||
stringplanmodifier.UseStateForUnknown(),
|
||||
|
|
@ -555,7 +555,7 @@ func mapFields(instance *postgresql.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
|
|
|
|||
|
|
@ -21,31 +21,31 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&postgresql.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&postgresql.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"enable_monitoring": true,
|
||||
"metrics_frequency": 1234,
|
||||
|
|
@ -57,16 +57,16 @@ func TestMapFields(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"enable_monitoring": types.BoolValue(true),
|
||||
"metrics_frequency": types.Int64Value(1234),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,19 +34,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -210,7 +210,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -488,7 +488,7 @@ func mapFields(instance *rabbitmq.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
|
|
|
|||
|
|
@ -21,46 +21,46 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&rabbitmq.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&rabbitmq.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"sgw_acl": "acl",
|
||||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"sgw_acl": types.StringValue("acl"),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,19 +34,19 @@ var (
|
|||
)
|
||||
|
||||
type Model struct {
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
OrganizationGuid types.String `tfsdk:"organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
Id types.String `tfsdk:"id"` // needed by TF
|
||||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
CfGuid types.String `tfsdk:"cf_guid"`
|
||||
CfSpaceGuid types.String `tfsdk:"cf_space_guid"`
|
||||
DashboardUrl types.String `tfsdk:"dashboard_url"`
|
||||
ImageUrl types.String `tfsdk:"image_url"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
CfOrganizationGuid types.String `tfsdk:"cf_organization_guid"`
|
||||
Parameters types.Object `tfsdk:"parameters"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
PlanName types.String `tfsdk:"plan_name"`
|
||||
PlanId types.String `tfsdk:"plan_id"`
|
||||
}
|
||||
|
||||
// Struct corresponding to DataSourceModel.Parameters
|
||||
|
|
@ -207,7 +207,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
"image_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"organization_guid": schema.StringAttribute{
|
||||
"cf_organization_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -485,7 +485,7 @@ func mapFields(instance *redis.Instance, model *Model) error {
|
|||
model.DashboardUrl = types.StringPointerValue(instance.DashboardUrl)
|
||||
model.ImageUrl = types.StringPointerValue(instance.ImageUrl)
|
||||
model.Name = types.StringPointerValue(instance.Name)
|
||||
model.OrganizationGuid = types.StringPointerValue(instance.OrganizationGuid)
|
||||
model.CfOrganizationGuid = types.StringPointerValue(instance.CfOrganizationGuid)
|
||||
|
||||
if instance.Parameters == nil {
|
||||
model.Parameters = types.ObjectNull(parametersTypes)
|
||||
|
|
|
|||
|
|
@ -21,46 +21,46 @@ func TestMapFields(t *testing.T) {
|
|||
"default_values",
|
||||
&redis.Instance{},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
OrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringNull(),
|
||||
Name: types.StringNull(),
|
||||
CfGuid: types.StringNull(),
|
||||
CfSpaceGuid: types.StringNull(),
|
||||
DashboardUrl: types.StringNull(),
|
||||
ImageUrl: types.StringNull(),
|
||||
CfOrganizationGuid: types.StringNull(),
|
||||
Parameters: types.ObjectNull(parametersTypes),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"simple_values",
|
||||
&redis.Instance{
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
OrganizationGuid: utils.Ptr("org"),
|
||||
PlanId: utils.Ptr("plan"),
|
||||
CfGuid: utils.Ptr("cf"),
|
||||
CfSpaceGuid: utils.Ptr("space"),
|
||||
DashboardUrl: utils.Ptr("dashboard"),
|
||||
ImageUrl: utils.Ptr("image"),
|
||||
InstanceId: utils.Ptr("iid"),
|
||||
Name: utils.Ptr("name"),
|
||||
CfOrganizationGuid: utils.Ptr("org"),
|
||||
Parameters: &map[string]interface{}{
|
||||
"sgw_acl": "acl",
|
||||
},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
OrganizationGuid: types.StringValue("org"),
|
||||
Id: types.StringValue("pid,iid"),
|
||||
InstanceId: types.StringValue("iid"),
|
||||
ProjectId: types.StringValue("pid"),
|
||||
PlanId: types.StringValue("plan"),
|
||||
Name: types.StringValue("name"),
|
||||
CfGuid: types.StringValue("cf"),
|
||||
CfSpaceGuid: types.StringValue("space"),
|
||||
DashboardUrl: types.StringValue("dashboard"),
|
||||
ImageUrl: types.StringValue("image"),
|
||||
CfOrganizationGuid: types.StringValue("org"),
|
||||
Parameters: types.ObjectValueMust(parametersTypes, map[string]attr.Value{
|
||||
"sgw_acl": types.StringValue("acl"),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue