Skip to content

Commit

Permalink
chore: deprecate aiven_account_authentication resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-held-aiven committed Dec 7, 2023
1 parent 187e615 commit eaa619b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 487 deletions.
81 changes: 41 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nav_order: 1
## [MAJOR.MINOR.PATCH] - YYYY-MM-DD

- Deprecating `project_user`, `account_team` and `account_team_member` resources
- Deprecate `account_authentication` resource. Resource creation is removed, while other operations are still possible.
- Fix unmarshalling empty userconfig crash
- Never skip basic auth username/password in service integrations user config options when sending them to the API
- Add `emit_backward_heartbeats_enabled` field support in Mirrormaker replication flow
Expand Down Expand Up @@ -50,7 +51,7 @@ nav_order: 1

- Add Organization User Groups support
- Fixed incorrect `account_id` behavior in mixed constraint setup in `aiven_project` resource
- Use updated aiven-go-client with enhanced retries
- Use updated aiven-go-client with enhanced retries
- Change `plan` from optional to required
- Improve `disk_space` deprecation message to become more explicit to migrating users
- Fix account deletion flakiness
Expand Down Expand Up @@ -104,7 +105,7 @@ nav_order: 1

- Added docs and validation for `aiven_service_integration_endpoint`
- Dropped `signalfx` from supported integration types
- Fix MySQL user creation authentication field
- Fix MySQL user creation authentication field
- Fix Account SAML Field mapping set method
- Adjust generated SQL for ClickHouse privilege grants
- Fix `required` not generated for top level fields for user config options
Expand Down Expand Up @@ -182,7 +183,7 @@ nav_order: 1
- Integration with Kafka source
- Integration with PostgreSQL source
- Fix VPC peering ID parser
- Add `offset_syncs_topic_location` support for `aiven_mirrormaker_replication_flow` resource
- Add `offset_syncs_topic_location` support for `aiven_mirrormaker_replication_flow` resource
- Add `ssl` and `kafka_authentication_method` output support in service components
- Fix `admin_username` and `admin_password` fields diff

Expand All @@ -192,7 +193,7 @@ nav_order: 1
- Add `ip_filter_object` and `namespaces_object` user config options which are meant to extend the existing `ip_filter` and `namespaces` ones
- Revert `datasource_project_vpc` `cloud_name` and `project` deprecations
- Add extra timeout for `kafka_connect` service integration create
- Support `clickhouse_kafka` integration type in `aiven_service_integration`
- Support `clickhouse_kafka` integration type in `aiven_service_integration`
- Fix `aiven_transit_gateway_vpc_attachment` fails to parse ID
- Prevent generation of `Default` field in static schema generator
- Add `self_link` field to `aiven_gcp_vpc_peering_connection` resource
Expand All @@ -212,7 +213,7 @@ nav_order: 1
## [3.8.0] - 2022-09-30

- Fix `aiven_gcp_vpc_peering_connection` creation
- Improve static IP error handling end messaging
- Improve static IP error handling end messaging
- Fix `aiven_account_authentication` resource update, add tests
- Change `aiven_project_vpc` datasource behaviour
- Fix `aiven_service_component` optional parameters filters
Expand Down Expand Up @@ -271,7 +272,7 @@ nav_order: 1
- Update Changelog Enforcer workflow
- Add CodeQL workflow
- Add `opensearch_index` support to `aiven_flink_table`
- Add not found checks to the Kafka availability waiter
- Add not found checks to the Kafka availability waiter
- Add PostgreSQL max connections and PgBouncer outputs
- Perform general code clean-up and add `revive` linter
- Add support for new user configuration options
Expand Down Expand Up @@ -523,8 +524,8 @@ New resources and data-sources:
- Add database deletion waiter
- Remove default values for user configuration options
- Improve documentation and examples
- Add Prometheus integration example
- Add example for Datadog metrics integration
- Add Prometheus integration example
- Add example for Datadog metrics integration

## [2.1.14] - 2021-05-18

Expand All @@ -533,11 +534,11 @@ New resources and data-sources:
- Use golang 1.16
- Remove GitHub pages and supporting code
- Rework documentation and examples
- New README file structure
- Removed the Getting Started guide and merged its contents on `docs/index.md`
- Splitting `docs/index.md` contents in other pages on the guides
- In examples use data source for the Aiven Project instead of resource
- In examples use `aiven_<svc>` resource instead of `aiven_service`
- New README file structure
- Removed the Getting Started guide and merged its contents on `docs/index.md`
- Splitting `docs/index.md` contents in other pages on the guides
- In examples use data source for the Aiven Project instead of resource
- In examples use `aiven_<svc>` resource instead of `aiven_service`

## [2.1.13] - 2021-05-07

Expand All @@ -546,10 +547,10 @@ New resources and data-sources:
## [2.1.12] - 2021-04-20

- Improve documentation
- Add missing import instructions
- Add `aiven_billing_group` documentation
- Fix required and optional `aiven_connection_pool` options
- Updates to `MirrorMaker` arguments list
- Add missing import instructions
- Add `aiven_billing_group` documentation
- Fix required and optional `aiven_connection_pool` options
- Updates to `MirrorMaker` arguments list
- Fix error message for prometheus user creation
- Fix project `technical_emails` and `billing_emails` fields schema
- Add support for new user configuration options
Expand Down Expand Up @@ -704,11 +705,11 @@ New resources and data-sources:
## [2.0.5] - 2020-09-17

- Extend service integration endpoint, add user configuration options
- `external_aws_cloudwatch_logs`
- `external_google_cloud_logging`
- `external_kafka`
- `jolokia`
- `signalfx`
- `external_aws_cloudwatch_logs`
- `external_google_cloud_logging`
- `external_kafka`
- `jolokia`
- `signalfx`
- Add support for new user configuration options
- Add Azure specific behaviour for VPC peering connection resource

Expand Down Expand Up @@ -744,16 +745,16 @@ New resources and data-sources:
- Add mongo sink connector examples and tests
- Kafka ACL regex modification
- New resources:
- `aiven_pg` PostgreSQL service
- `aiven_cassandra` Cassandra service
- `aiven_elasticsearch` Elasticsearch service
- `aiven_grafana` Grafana service
- `aiven_influxdb` Influxdb service
- `aiven_redis` Redis service
- `aiven_mysql` MySQL service
- `aiven_kafka` Kafka service
- `aiven_kafka_connect` Kafka Connect service
- `aiven_kafka_mirrormaker` Kafka Mirrormaker 2 service
- `aiven_pg` PostgreSQL service
- `aiven_cassandra` Cassandra service
- `aiven_elasticsearch` Elasticsearch service
- `aiven_grafana` Grafana service
- `aiven_influxdb` Influxdb service
- `aiven_redis` Redis service
- `aiven_mysql` MySQL service
- `aiven_kafka` Kafka service
- `aiven_kafka_connect` Kafka Connect service
- `aiven_kafka_mirrormaker` Kafka Mirrormaker 2 service

## [1.3.5] - 2020-08-11

Expand Down Expand Up @@ -796,10 +797,10 @@ Improve vpc_id error handling for vpc peering connection
- Speed up kafka topic availability waiter
- Kafka Connect examples
- TF client timings added for the following resources:
- aiven_vpc_peering_connection
- aiven_project_vpc
- aiven_service
- aiven_kafka_topic
- aiven_vpc_peering_connection
- aiven_project_vpc
- aiven_service
- aiven_kafka_topic

## [1.2.3] - 2020-03-30

Expand All @@ -823,10 +824,10 @@ Terraform client-side termination protection for resources:

- Following new types of resources have been added:

- account
- account_team
- account_team_member
- account_team_project
- account
- account_team
- account_team_member
- account_team_project

- New configuration options
- Fix for a read-only replica service types
Expand Down
35 changes: 4 additions & 31 deletions internal/sdkprovider/service/account/account_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,40 +153,13 @@ func ResourceAccountAuthentication() *schema.Resource {
},
Timeouts: schemautil.DefaultResourceTimeouts(),

Schema: aivenAccountAuthenticationSchema,
Schema: aivenAccountAuthenticationSchema,
DeprecationMessage: "This resource is deprecated",
}
}

func resourceAccountAuthenticationCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
client := m.(*aiven.Client)

accountID := d.Get("account_id").(string)
r, err := client.AccountAuthentications.Create(
ctx,
accountID,
aiven.AccountAuthenticationMethodCreate{
AuthenticationMethodName: d.Get("name").(string),
AuthenticationMethodType: d.Get("type").(string),
AutoJoinTeamID: d.Get("auto_join_team_id").(string),
SAMLCertificate: strings.TrimSpace(d.Get("saml_certificate").(string)),
SAMLDigestAlgorithm: d.Get("saml_digest_algorithm").(string),
SAMLEntityID: d.Get("saml_entity_id").(string),
SAMLFieldMapping: readSAMLFieldMappingFromSchema(d),
SAMLIdpLoginAllowed: d.Get("saml_idp_login_allowed").(bool),
SAMLIdpURL: d.Get("saml_idp_url").(string),
SAMLSignatureAlgorithm: d.Get("saml_signature_algorithm").(string),
SAMLVariant: d.Get("saml_variant").(string),
},
)
if err != nil {
return diag.FromErr(err)
}

d.SetId(schemautil.BuildResourceID(
accountID,
r.AuthenticationMethod.AuthenticationMethodID))

return resourceAccountAuthenticationRead(ctx, d, m)
func resourceAccountAuthenticationCreate(_ context.Context, _ *schema.ResourceData, _ interface{}) diag.Diagnostics {
return diag.Errorf("creating account authentication is unsupported")
}

func resourceAccountAuthenticationRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func DatasourceAccountAuthentication() *schema.Resource {
Description: "The Account Authentication data source provides information about the existing Aiven Account Authentication.",
Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenAccountAuthenticationSchema,
"account_id", "name"),
DeprecationMessage: "This resource is deprecated",
}
}

Expand Down
Loading

0 comments on commit eaa619b

Please sign in to comment.