![github-actions[bot]](/assets/img/avatar_default.png)
* Create rule S7452 * SONARIAC-1869 Create rule S7452 AWS resource tags should have valid format --------- Co-authored-by: petertrr <petertrr@users.noreply.github.com> Co-authored-by: Peter Trifanov <peter.trifanov@sonarsource.com>
43 lines
700 B
Plaintext
43 lines
700 B
Plaintext
include::../description.adoc[]
|
|
|
|
== How to fix it
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,terraform,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
resource "aws_s3_bucket" "examplebucket" {
|
|
bucket = "mybucketname"
|
|
|
|
tags = {
|
|
"anycompany:~cost-center~" = "Accounting"
|
|
}
|
|
}
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,terraform,diff-id=1,diff-type=compliant]
|
|
----
|
|
resource "aws_s3_bucket" "examplebucket" {
|
|
bucket = "mybucketname"
|
|
|
|
tags = {
|
|
"anycompany:cost-center" = "Accounting"
|
|
}
|
|
}
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[] |